Skip to content

Commit

Permalink
support modified localStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxkad committed Sep 30, 2023
1 parent 2021859 commit baf2c00
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmds/mcla_wasm/js_globals.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ func getStorageValue(key string, ptr any)(ok bool){
return
}
key = appStorageKeyPrefix + key
value := localStorage.Call("getItem", key)
if js.Null().Equal(value) {
value, err := awaitPromise(localStorage.Call("getItem", key))
if err != nil {
return false
}
if !value.Truthy() {
return false
}
if ptr != nil {
Expand Down

0 comments on commit baf2c00

Please sign in to comment.