diff --git a/src/utils.js b/src/utils.js index 81b1b22..64bc205 100644 --- a/src/utils.js +++ b/src/utils.js @@ -22,7 +22,8 @@ module.exports.linebrk = function (str, maxLen) { }; module.exports.detectEnvironment = function () { - if (process && process.title === 'browser' || (typeof(window) !== 'undefined' && window)) { + + if (typeof(window) !== 'undefined' && window && !(process && process.title === 'node')) { return 'browser'; }