Merge "Make selected tab default when unknown value comes from localStorage"

This commit is contained in:
jenkins-bot 2014-07-29 21:56:14 +00:00 committed by Gerrit Code Review
commit bea216532c

View file

@ -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 ) {