diff --git a/debug.js b/debug.js index b5fe1bc..e47ba5b 100644 --- a/debug.js +++ b/debug.js @@ -50,7 +50,9 @@ debug.skips = []; */ debug.enable = function(name) { - localStorage.debug = name; + try { + localStorage.debug = name; + } catch(e){} var split = (name || '').split(/[\s,]+/) , len = split.length; @@ -119,4 +121,4 @@ debug.enabled = function(name) { // persist -if (window.localStorage) debug.enable(localStorage.debug); \ No newline at end of file +if (window.localStorage) debug.enable(localStorage.debug);