Skip to content

Commit

Permalink
Actually fixed node detection
Browse files Browse the repository at this point in the history
  • Loading branch information
rkoeninger committed Oct 15, 2019
1 parent dc5e4ce commit 202628a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/shen.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const isNode = typeof process !== 'undefined' && process.versions != null && process.versions.node != null;

module.exports = class Shen {
constructor (options = {}) {
const target = typeof process === 'undefined' ? 'web' : 'node';
const target = isNode ? 'node' : 'web';
const backend = require('./backend.js');
const config = require(`./config.${target}.js`);
const kernel = require('./kernel.js');
Expand Down

0 comments on commit 202628a

Please sign in to comment.