Closed kesne closed 8 years ago
Do you mean direct .clear()
call from external code?
Yes, localStorage.clear()
will cause this error. Also clearing Local Storage via the chrome content settings will also cause this error.
Good catch, thanks for report!
Is it urgent or can wait 2 weeks?
@puzrin No worries, it can totally wait a few weeks.
@puzrin Any updates on this? Sadly we've had this error keep showing up in production.
Marked to fix tomorrow
Could you check files from master for sure prior i do release?
Published 1.0.5 with fix
When the clear method is called, the corresponding StorageEvent has a key property set to
null
. See here: https://developer.mozilla.org/en-US/docs/Web/API/StorageEventThis causes an exception to be thrown at this line because it attempts to call
indexOf
on null: https://github.com/nodeca/tabex/blob/93feb7d020b8294d09af1c8ed862059fb6b5259e/lib/router.js#L310