Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Handle stale localStorage when selecting the default tab in the UI

Fixes #121
  • Loading branch information...
commit 0dcb97aa2f9a2d13356c382cccaa37d3f90b90fa 1 parent 76a9918
@ericf 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.