We use try/catch appropriately in other places but it was missing
in mw.store.clear().
If the user agent has localStorage disabled an exception will be thrown
for any operation that touches the object.
Change-Id: Idcd0e4c8ba9b0843b2ddcad0ae1781e4915e04fe
*/
clear: function () {
mw.loader.store.items = {};
*/
clear: function () {
mw.loader.store.items = {};
- localStorage.removeItem( mw.loader.store.getStoreKey() );
+ try {
+ localStorage.removeItem( mw.loader.store.getStoreKey() );
+ } catch ( ignored ) {}