From 0b06a6f4b7a3600862d6f12b0afdb6f945fa61a9 Mon Sep 17 00:00:00 2001 From: Alan Hoffmeister Date: Mon, 10 Oct 2016 15:08:31 -0700 Subject: [PATCH] Do not monkeypatch window.document --- lib/utils/log.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/utils/log.js b/lib/utils/log.js index 4521208..e6f9a76 100644 --- a/lib/utils/log.js +++ b/lib/utils/log.js @@ -2,9 +2,6 @@ import root from './window-or-global' (function (base) { window = base || window - if (!window.document) { - window.document = { documentElement: { style: { WebkitAppearance: true } } } - } if(!window.localStorage) window.localStorage = {}; })(root); @@ -20,9 +17,9 @@ export class Log { } enable(booleanOrStringDebug) { - window.localStorage.debug = - typeof booleanOrStringDebug === 'string' ? - booleanOrStringDebug : + window.localStorage.debug = + typeof booleanOrStringDebug === 'string' ? + booleanOrStringDebug : (booleanOrStringDebug ? '*' : booleanOrStringDebug); this.enabled = !!window.localStorage.debug; @@ -55,4 +52,4 @@ export class Log { } } -export default Log; \ No newline at end of file +export default Log;