From 3befec28b4bdcf471f67a4b886cff21809552a9e Mon Sep 17 00:00:00 2001
From: Mark Carver <mark.carver@me.com>
Date: Thu, 13 Feb 2014 12:25:29 -0600
Subject: [PATCH] Issue #2195621 by Mark Carver: Persistent fieldsets
 Incorrectly determine if localStorage exists.

---
 js/project-issue.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/js/project-issue.js b/js/project-issue.js
index 073023a..366d4a9 100644
--- a/js/project-issue.js
+++ b/js/project-issue.js
@@ -54,7 +54,7 @@
   Drupal.behaviors.projectIssuePersistentFieldsets = {
     attach: function () {
       // Only continue if localStorage is supported in the browser.
-      if (typeof window.localStorage !== 'undefined') {
+      if ('localStorage' in window && typeof window.localStorage !== 'undefined' && window['localStorage'] !== null) {
         // Only bind once.
         $('#project-issue-ajax-form').once('issue-form', function () {
           var prefix = $(this).parents('[id]').attr('id');
-- 
1.8.5.3

