script: fix storage methods

This commit is contained in:
bordun 2020-08-10 22:27:55 +02:00
parent c06ef537b4
commit c6a7d34e90
2 changed files with 8 additions and 2 deletions

View file

@ -1,5 +1,11 @@
# Changelog
## 1.0.4
- bug fixes
- script: broken `storage.getItem` and `storage.removeItem`
## 1.0.3
- bug fixes

View file

@ -222,8 +222,8 @@ class ScriptVm extends Vm {
this.sandbox.contentWindow.storage = {
setItem: (k, v)=>cache.set('script.' + k, v),
getItem: (k)=>cache.get('script.' + k, v),
removeItem: (k)=>cache.remove('script.' + k, v),
getItem: (k)=>cache.get('script.' + k),
removeItem: (k)=>cache.remove('script.' + k),
clear: ()=>cache.clear('script.')
}