Skip to content

Commit

Permalink
Merge pull request #15750 from zxdsax/patch-2
Browse files Browse the repository at this point in the history
removeStorage 删除js侧缓存
  • Loading branch information
qican777 authored May 20, 2024
2 parents 2bd714a + d52ada5 commit 1653ac1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/taro-platform-harmony-hybrid/src/api/apis/NativeApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,16 @@ class CacheStorageProxy {
return status
}
}
if (prop === 'removeStorageSync') {
return (...args: any[]) => {
const { key } = args[0]
const status = this.asyncToSyncProxy.removeStorageSync({ key })
if (status.done && status.errorMsg === '') {
this.cacheMap.delete(key)
}
return status
}
}
return (...args: any[]) => {
return this.asyncToSyncProxy[prop](...args)
}
Expand Down

0 comments on commit 1653ac1

Please sign in to comment.