From dc86779d521186c444cee37cc712f23c3f6db886 Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Wed, 9 Nov 2016 15:01:46 -0800 Subject: [PATCH] If we're in Electron, try to fallback to process.env.DEBUG if we've got it --- browser.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/browser.js b/browser.js index a31d6ff3..d82e9176 100644 --- a/browser.js +++ b/browser.js @@ -142,6 +142,12 @@ function load() { try { r = exports.storage.debug; } catch(e) {} + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if ('env' in (process || {})) { + r = process.env.DEBUG; + } + return r; }