mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-24 16:23:49 +00:00
Merge "Handle window.localStorage === null case correctly."
This commit is contained in:
commit
8b7cfd12d5
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue