Skip to content

Commit

Permalink
Update MiniAppViewHandler.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
rleojoseph committed Oct 16, 2023
1 parent 2e99f67 commit 5ea6d92
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Sources/Classes/core/View/MiniAppViewHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,8 @@ extension MiniAppViewHandler {
// swiftlint:enable file_length function_body_length

extension String {
func base64Encoded() -> String? {
data(using: .utf8)?.base64EncodedString()
}
func base64Encoded() -> String? {
guard let data = data(using: .nonLossyASCII) else { return "" }
return data.base64EncodedString()
}
}

0 comments on commit 5ea6d92

Please sign in to comment.