From da34a7677b4e1c6be8a6a90b0d48c99208150407 Mon Sep 17 00:00:00 2001 From: Johnny Accot Date: Sun, 8 Oct 2017 11:36:36 +0200 Subject: [PATCH] Fixed cookie test. --- dist/loglevel.js | 2 +- dist/loglevel.min.js | 2 +- lib/loglevel.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/loglevel.js b/dist/loglevel.js index ada2a09..1a78580 100644 --- a/dist/loglevel.js +++ b/dist/loglevel.js @@ -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) {} diff --git a/dist/loglevel.min.js b/dist/loglevel.min.js index 8017655..9d8797a 100644 --- a/dist/loglevel.min.js +++ b/dist/loglevel.min.js @@ -1,2 +1,2 @@ /*! loglevel - v1.5.0 - https://github.com/pimterry/loglevel - (c) 2017 Tim Perry - licensed MIT */ -!function(a,b){"use strict";"function"==typeof define&&define.amd?define(b):"object"==typeof module&&module.exports?module.exports=b():a.log=b()}(this,function(){"use strict";function a(a,b){var c=a[b];if("function"==typeof c.bind)return c.bind(a);try{return Function.prototype.bind.call(c,a)}catch(b){return function(){return Function.prototype.apply.apply(c,[a,arguments])}}}function b(b){return"debug"===b&&(b="log"),typeof console!==h&&(void 0!==console[b]?a(console,b):void 0!==console.log?a(console,"log"):g)}function c(a,b){for(var c=0;c=0&&b<=k.levels.SILENT))throw"log.setLevel() called with invalid level: "+b;if(j=b,!1!==d&&f(b),c.call(k,b,a),typeof console===h&&b=0&&b<=k.levels.SILENT))throw"log.setLevel() called with invalid level: "+b;if(j=b,!1!==d&&f(b),c.call(k,b,a),typeof console===h&&b