File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,6 +142,12 @@ function load() {
142142 try {
143143 r = exports . storage . debug ;
144144 } catch ( e ) { }
145+
146+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
147+ if ( 'env' in ( process || { } ) ) {
148+ r = process . env . DEBUG ;
149+ }
150+
145151 return r ;
146152}
147153
Original file line number Diff line number Diff line change 1+ /**
2+ * Detect Electron renderer process, which is node, but we should
3+ * treat as a browser.
4+ */
5+
6+ if ( ( process || { } ) . type === 'renderer' ) {
7+ module . exports = require ( './browser.js' ) ;
8+ } else {
9+ module . exports = require ( './node.js' ) ;
10+ }
Original file line number Diff line number Diff line change 2424 "browserify" : " 9.0.3" ,
2525 "mocha" : " *"
2626 },
27- "main" : " ./node .js" ,
27+ "main" : " ./index .js" ,
2828 "browser" : " ./browser.js" ,
2929 "component" : {
3030 "scripts" : {
You can’t perform that action at this time.
0 commit comments