Skip to content

Commit

Permalink
chore(log): Check for localStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Spitzer committed Aug 22, 2018
1 parent 7ba42ae commit 3efa969
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ const colors = [
function debugEnabled(namespace) {
let debugExpression;
try {
debugExpression = window.localStorage.getItem('debug');
if (window.localStorage) {
debugExpression = window.localStorage.getItem('debug');
}
} catch (error) {
if (
error instanceof DOMException &&
Expand Down

0 comments on commit 3efa969

Please sign in to comment.