mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-24 08:13:38 +00:00
Merge "Make selected tab default when unknown value comes from localStorage"
This commit is contained in:
commit
bea216532c
|
@ -94,7 +94,13 @@
|
|||
this.ooTabs.embed
|
||||
] );
|
||||
|
||||
this.selectedTab = this.getLastUsedTab() || 'download';
|
||||
this.selectedTab = this.getLastUsedTab();
|
||||
|
||||
// In case nothing is saved in localStorage or it contains junk
|
||||
if ( ! this.tabs.hasOwnProperty( this.selectedTab ) ) {
|
||||
this.selectedTab = 'download';
|
||||
}
|
||||
|
||||
this.reuseTabs.selectItem( this.ooTabs[this.selectedTab] );
|
||||
|
||||
if ( this.dependenciesNeedToBeAttached ) {
|
||||
|
|
Loading…
Reference in a new issue