Skip to content
This repository
Browse code

Fix edge case in sessionStorage detection for FireFox. If it is disab…

…led using about:config, typeof will be object, but the value will be null.
  • Loading branch information...
commit 3bc2798e726221cfcadfa1bff13222073aa76abb 1 parent 36c8fc2
jakr authored July 24, 2012

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  admin/javascript/LeftAndMain.js
4  admin/javascript/LeftAndMain.js
@@ -441,7 +441,7 @@ jQuery.noConflict();
441 441
 			 * Requires HTML5 sessionStorage support.
442 442
 			 */
443 443
 			saveTabState: function() {
444  
-				if(typeof(window.sessionStorage)=="undefined") return;
  444
+				if(typeof(window.sessionStorage)=="undefined" || window.sessionStorage == null) return;
445 445
 
446 446
 				var selectedTabs = [], url = this._tabStateUrl();
447 447
 				this.find('.cms-tabset,.ss-tabset').each(function(i, el) {
@@ -459,7 +459,7 @@ jQuery.noConflict();
459 459
 			 * Requires HTML5 sessionStorage support.
460 460
 			 */
461 461
 			restoreTabState: function() {
462  
-				if(typeof(window.sessionStorage)=="undefined") return;
  462
+				if(typeof(window.sessionStorage)=="undefined" || window.sessionStorage == null) return;
463 463
 
464 464
 				var self = this, url = this._tabStateUrl(),
465 465
 					data = window.sessionStorage.getItem('tabs-' + url),

0 notes on commit 3bc2798

Please sign in to comment.
Something went wrong with that request. Please try again.