mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Fix edge case in sessionStorage detection for FireFox. If it is disabled using about:config, typeof will be object, but the value will be null.
This commit is contained in:
parent
36c8fc2e93
commit
3bc2798e72
@ -441,7 +441,7 @@ jQuery.noConflict();
|
||||
* Requires HTML5 sessionStorage support.
|
||||
*/
|
||||
saveTabState: function() {
|
||||
if(typeof(window.sessionStorage)=="undefined") return;
|
||||
if(typeof(window.sessionStorage)=="undefined" || window.sessionStorage == null) return;
|
||||
|
||||
var selectedTabs = [], url = this._tabStateUrl();
|
||||
this.find('.cms-tabset,.ss-tabset').each(function(i, el) {
|
||||
@ -459,7 +459,7 @@ jQuery.noConflict();
|
||||
* Requires HTML5 sessionStorage support.
|
||||
*/
|
||||
restoreTabState: function() {
|
||||
if(typeof(window.sessionStorage)=="undefined") return;
|
||||
if(typeof(window.sessionStorage)=="undefined" || window.sessionStorage == null) return;
|
||||
|
||||
var self = this, url = this._tabStateUrl(),
|
||||
data = window.sessionStorage.getItem('tabs-' + url),
|
||||
|
Loading…
x
Reference in New Issue
Block a user