Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #122 from ericf/default-tab-stale-localstorage

Handle stale localStorage when selecting the default tab in the UI
  • Loading branch information...
commit a2b131bec334df335ca6a021e9bf5ed08f533743 2 parents 76a9918 + 0dcb97a
@davglass davglass authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 themes/default/assets/js/apidocs.js
View
5 themes/default/assets/js/apidocs.js
@@ -247,6 +247,11 @@ pjax.updateTabState = function (src) {
} else {
tab = Y.one('#classdocs .api-class-tab.' + defaultTab);
+ // When the `defaultTab` node isn't found, `localStorage` is stale.
+ if (!tab && defaultTab !== 'index') {
+ tab = Y.one('#classdocs .api-class-tab.index');
+ }
+
if (classTabView.get('rendered')) {
Y.Widget.getByNode(tab).set('selected', 1);
} else {
Please sign in to comment.
Something went wrong with that request. Please try again.