jenkins-bot has submitted this change and it was merged. 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(-) Approvals: Ori.livneh: Looks good to me, approved EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.js b/resources/mmv/ui/mmv.ui.metadataPanel.js index 26782a7..210ecaa 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(); @@ -869,7 +868,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/130494 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I49ddf45093daee4988fb7f3b481fb35bfaceb152 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: wmf/1.24wmf1 Gerrit-Owner: Gergő Tisza <gti...@wikimedia.org> Gerrit-Reviewer: EBernhardson <ebernhard...@wikimedia.org> Gerrit-Reviewer: Ori.livneh <o...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits