// Check for localStorage support
var hasLocalStorage = typeof window !== 'undefined' && window.localStorage;

var _localStorage = {
    getItem: function(key) {
        if (!hasLocalStorage) { return null; }

        return window.localStorage.getItem(key);
    },
    setItem: function(key, value) {
        if (!hasLocalStorage) { return null; }

        return window.localStorage.setItem(key, value);
    }
};

module.exports = _localStorage;
@@ -1,59 +1,54 @@
-// Check for localStorage support%0Avar hasLocalStorage =
+var hasLocalStorage = function() %7B%0A%09try %7B%0A%09%09return
  typ
@@ -97,16 +97,51 @@
 Storage;
+%0A%09%7D catch(e) %7B%0A%09%09return false;%0A%09%7D%0A%7D
 %0A%0Avar _l
@@ -213,36 +213,40 @@
 lStorage
+()
 ) %7B
- return null; %7D%0A%0A
+%0A        try %7B%0A    
         
@@ -286,16 +286,63 @@
 m(key);%0A
+        %7D catch(e) %7B%0A%09%09    return null;%0A%09    %7D%0A
     %7D,%0A 
@@ -404,16 +404,18 @@
 lStorage
+()
 ) %7B retu
@@ -425,17 +425,34 @@
 null; %7D%0A
-%0A
+        try %7B%0A    
         
@@ -507,41 +507,56 @@
     
-%7D%0A%7D;%0A%0Amodule.exports = _localStorage;
+    %7D catch(e) %7B%0A%09%09    return null;%0A%09    %7D%0A    %7D%0A%7D;%0A

Fix error in checking for localStorage