Skip to content

Commit

Permalink
fix(flags): Node and browser detection
Browse files Browse the repository at this point in the history
  • Loading branch information
drazik committed Dec 10, 2018
1 parent 5146142 commit 0b3c4d7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/cozy-flags/src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
export { default as FlagSwitcher } from './browser/FlagSwitcher'

const flag = global
const isNode = global && global.process && global.process.title === 'node'

const flag = isNode
? require('./node/flag').default
: require('./browser/flag').default

Expand Down

0 comments on commit 0b3c4d7

Please sign in to comment.