From 6ee0763be2e7e2a200acc1c9f6e8e48c10028f96 Mon Sep 17 00:00:00 2001 From: Eric Newport Date: Wed, 29 Jul 2015 15:15:11 -0400 Subject: [PATCH] Better check for node.js context --- ClosureCompiler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ClosureCompiler.js b/ClosureCompiler.js index 11de342..3aaef14 100644 --- a/ClosureCompiler.js +++ b/ClosureCompiler.js @@ -21,7 +21,7 @@ */ (function(global) { - if ((typeof window != 'undefined' && !!window.window) || typeof require != 'function') { + if (typeof require != 'function' || !module || !module.exports || !process) { throw(new Error("ClosureCompiler.js can only be used within node.js")); }