Skip to content

Commit

Permalink
Merge pull request NervJS#15724 from zxdsax/patch-1
Browse files Browse the repository at this point in the history
修复JS测缓存机制
  • Loading branch information
qican777 authored May 14, 2024
2 parents a91e4de + 31ec759 commit 6caa1f1
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ class CacheStorageProxy {
return this.cacheMap.get(key)
} else {
const status = this.asyncToSyncProxy.getStorageSync({ key })
if (status.done && status.errMsg === '') {
if (status.done && status.errorMsg === '') {
this.cacheMap.set(key, status)
}
return status
Expand All @@ -858,7 +858,8 @@ class CacheStorageProxy {
return (...args: any[]) => {
const { key, data } = args[0]
const status = this.asyncToSyncProxy.setStorageSync({ key, data })
if (status.done && status.errMsg === '') {
if (status.done && status.errorMsg === '') {
status.data = data
this.cacheMap.set(key, status)
}
return status
Expand Down

0 comments on commit 6caa1f1

Please sign in to comment.