You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Storage: fix clear and removeItem
The mutations array usually contains an index into StringContext for
value of key/value in the operation. Historically, "delete" was
modeled as 0th index into the array. Unfortunately, this didn't make
sense if the first SET op was genuinely referring to the 0th string
value (See #1035).
While this fixed the first get/set operation, it also meant that deletes
were no longer possible! This PR now models the delete operation as a -1
in the unsigned mutation array, corresponding to 2^16-1.
* dont rely on overflow
* switch to special casing 0-value
* clean up test
* switch to isolating change within LocalStorage processor
* jridgewell found fix
0 commit comments