Skip to content

Commit

Permalink
Merge pull request #112 from quotquot/master
Browse files Browse the repository at this point in the history
Fixed cookie test.
  • Loading branch information
pimterry authored Oct 9, 2017
2 parents e70c9b6 + da34a76 commit 583a302
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 583a302

Please sign in to comment.