Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/130493
Change subject: Handle window.localStorage === null case correctly. ...................................................................... Handle window.localStorage === null case correctly. Change-Id: I49ddf45093daee4988fb7f3b481fb35bfaceb152 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/521 Bug: 64525 (cherry picked from commit a56759d8fe5cfef7a06e115a2cb9d7e8bc403905) --- M resources/mmv/ui/mmv.ui.metadataPanel.js 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/93/130493/1 diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.js b/resources/mmv/ui/mmv.ui.metadataPanel.js index 47c3b2f..f1001a3 100644 --- a/resources/mmv/ui/mmv.ui.metadataPanel.js +++ b/resources/mmv/ui/mmv.ui.metadataPanel.js @@ -37,8 +37,7 @@ * @property {boolean} * @private */ - this.hasAnimatedMetadata = window.localStorage === undefined || - localStorage.getItem( 'mmv.hasOpenedMetadata' ); + this.hasAnimatedMetadata = !window.localStorage || localStorage.getItem( 'mmv.hasOpenedMetadata' ); /** @property {mw.mmv.HtmlUtils} htmlUtils - */ this.htmlUtils = new mw.mmv.HtmlUtils(); @@ -829,7 +828,7 @@ if ( !this.savedHasOpenedMetadata && scrolled && - window.localStorage !== undefined + window.localStorage ) { localStorage.setItem( 'mmv.hasOpenedMetadata', true ); this.savedHasOpenedMetadata = true; -- To view, visit https://gerrit.wikimedia.org/r/130493 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I49ddf45093daee4988fb7f3b481fb35bfaceb152 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: wmf/1.24wmf2 Gerrit-Owner: Gergő Tisza <gti...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits