charCode
This commit is contained in:
parent
ed4b21c2c7
commit
19cd21cf0b
2 changed files with 2 additions and 2 deletions
|
|
@ -63,7 +63,7 @@ const parsedInitialResults = () => {
|
|||
|
||||
const decodeUTF8Base64 = (data) => {
|
||||
const rawData = atob(data)
|
||||
const array = Uint8Array.from([...rawData].map((char) => char.charCodeAt(0)))
|
||||
const array = Uint8Array.from([...rawData].map((char) => char.codePointAt(0)))
|
||||
const text = new TextDecoder().decode(array)
|
||||
return text
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ function urlBase64ToUint8Array(base64String) {
|
|||
const base64 = (base64String + padding).replace(/-/g, '+').replace(/_/g, '/')
|
||||
|
||||
const rawData = window.atob(base64)
|
||||
return Uint8Array.from([...rawData].map((char) => char.charCodeAt(0)))
|
||||
return Uint8Array.from([...rawData].map((char) => char.codePointAt(0)))
|
||||
}
|
||||
|
||||
export function isSWSupported() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue