Fossil SCM
fossil.storage.clear() is now also sandboxed - no longer nuking all state for all repos on the same origin.
Commit
d2d8894bb2d6a0dcc9bcc21eb16fae914f45a26d9f366d6876d7ebcd65102f2e
Parent
923affb930a27bc…
1 file changed
+1
-1
+1
-1
| --- src/fossil.storage.js | ||
| +++ src/fossil.storage.js | ||
| @@ -121,11 +121,11 @@ | ||
| 121 | 121 | $storage.removeItem(storageKeyPrefix+k); |
| 122 | 122 | return this; |
| 123 | 123 | }, |
| 124 | 124 | /** Clears ALL keys from the storage. Returns this. */ |
| 125 | 125 | clear: function(){ |
| 126 | - $storage.clear(); | |
| 126 | + this.keys().forEach((k)=>$storage.removeItem(/*w/o prefix*/k)); | |
| 127 | 127 | return this; |
| 128 | 128 | }, |
| 129 | 129 | /** Returns an array of all keys currently in the storage. */ |
| 130 | 130 | keys: ()=>Object.keys($storageHolder).filter((v)=>(v||'').startsWith(storageKeyPrefix)), |
| 131 | 131 | /** Returns true if this storage is transient (only available |
| 132 | 132 |
| --- src/fossil.storage.js | |
| +++ src/fossil.storage.js | |
| @@ -121,11 +121,11 @@ | |
| 121 | $storage.removeItem(storageKeyPrefix+k); |
| 122 | return this; |
| 123 | }, |
| 124 | /** Clears ALL keys from the storage. Returns this. */ |
| 125 | clear: function(){ |
| 126 | $storage.clear(); |
| 127 | return this; |
| 128 | }, |
| 129 | /** Returns an array of all keys currently in the storage. */ |
| 130 | keys: ()=>Object.keys($storageHolder).filter((v)=>(v||'').startsWith(storageKeyPrefix)), |
| 131 | /** Returns true if this storage is transient (only available |
| 132 |
| --- src/fossil.storage.js | |
| +++ src/fossil.storage.js | |
| @@ -121,11 +121,11 @@ | |
| 121 | $storage.removeItem(storageKeyPrefix+k); |
| 122 | return this; |
| 123 | }, |
| 124 | /** Clears ALL keys from the storage. Returns this. */ |
| 125 | clear: function(){ |
| 126 | this.keys().forEach((k)=>$storage.removeItem(/*w/o prefix*/k)); |
| 127 | return this; |
| 128 | }, |
| 129 | /** Returns an array of all keys currently in the storage. */ |
| 130 | keys: ()=>Object.keys($storageHolder).filter((v)=>(v||'').startsWith(storageKeyPrefix)), |
| 131 | /** Returns true if this storage is transient (only available |
| 132 |