Skip to content

Commit

Permalink
Added check for sessionStorage to make sure defined before using in T…
Browse files Browse the repository at this point in the history
…abbed interface (for using IE locally where the sessionStorage polyfill can't work).
  • Loading branch information
Paul Jackson authored and Paul Jackson committed Mar 7, 2013
1 parent 197fc92 commit 53684c4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/js/workers/tabbedinterface.js
Expand Up @@ -531,11 +531,16 @@
* Track the currently active tab for the user's session
*/
_set_active_panel : function(id, tabListIdx) {
window.sessionStorage.setItem('activePanel-' + tabListIdx, id);
if (typeof window.sessionStorage !== 'undefined') {
window.sessionStorage.setItem('activePanel-' + tabListIdx, id);
}
},

_get_active_panel : function(tabListIdx) {
return window.sessionStorage.getItem('activePanel-' + tabListIdx);
if (typeof window.sessionStorage !== 'undefined') {
return window.sessionStorage.getItem('activePanel-' + tabListIdx);
}
return null;
},

/**
Expand Down

0 comments on commit 53684c4

Please sign in to comment.