fix: unicode to ascii issue
This commit is contained in:
parent
b4fe8acb42
commit
ba7d6dd087
@ -34,10 +34,10 @@ export const loadStore = () => {
|
||||
}
|
||||
}
|
||||
|
||||
function serialize(data: string) {
|
||||
return JSON.stringify(btoa(encodeURIComponent(data)))
|
||||
function serialize(data: object): string {
|
||||
return btoa(encodeURIComponent(JSON.stringify(data)))
|
||||
}
|
||||
|
||||
function deserialize(b64: string) {
|
||||
function deserialize(b64: string): string {
|
||||
return JSON.parse(decodeURIComponent(atob(b64)))
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user