From 1ca90603fbb52458285e6948247dc7c5d5821c1d Mon Sep 17 00:00:00 2001 From: Michael Succi Date: Sun, 17 Nov 2013 17:56:30 -0800 Subject: [PATCH] Stricter checking for node.js. We need to also check to see if the 'process' variable is defined because some front-end frameworks (like Thorax) use modules. --- cssbeautify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cssbeautify.js b/cssbeautify.js index b4ae096..d123cf0 100644 --- a/cssbeautify.js +++ b/cssbeautify.js @@ -458,7 +458,7 @@ return formatted; } - if (typeof exports !== 'undefined') { + if (typeof exports !== 'undefined' && typeof process !== 'undefined') { // Node.js module. module.exports = exports = cssbeautify; } else if (typeof window === 'object') {