Skip to content

Commit

Permalink
Fixed cookie test.
Browse files Browse the repository at this point in the history
  • Loading branch information
tityron committed Oct 8, 2017
1 parent e70c9b6 commit da34a76
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/loglevel.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
var cookie = window.document.cookie;
var location = cookie.indexOf(
encodeURIComponent(storageKey) + "=");
if (location) {
if (location !== -1) {
storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];
}
} catch (ignore) {}
Expand Down
2 changes: 1 addition & 1 deletion dist/loglevel.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/loglevel.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
var cookie = window.document.cookie;
var location = cookie.indexOf(
encodeURIComponent(storageKey) + "=");
if (location) {
if (location !== -1) {
storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];
}
} catch (ignore) {}
Expand Down

0 comments on commit da34a76

Please sign in to comment.