Skip to content

Commit

Permalink
Add a switch to flip between electron and node
Browse files Browse the repository at this point in the history
  • Loading branch information
anaisbetts committed Nov 9, 2016
1 parent 2f9dc36 commit d267111
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Detect Electron renderer process, which is node, but we should
* treat as a browser.
*/

if ((process || {}).type === 'renderer') {
module.exports = require('./browser');
} else {
module.exports = require('./node');
}

0 comments on commit d267111

Please sign in to comment.