From 62a0c9c36b955262b4b7c242848054af1a5cac8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Fri, 10 Mar 2017 23:21:21 +0100 Subject: [PATCH] Revert accidental condition sequence change. `typeof module` needs to come before 2nd condition. --- src/export.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/export.js b/src/export.js index 801a2907..6b9358ea 100644 --- a/src/export.js +++ b/src/export.js @@ -45,7 +45,7 @@ if (typeof define === 'function' && define.amd) { // define() inside the built library (from inlined Acorn / Esprima) that // apparently confuse the require.js optimizer. define('paper', paper); -} else if (module && typeof module === 'object') { // could be `null` +} else if (typeof module === 'object' && module) { // could be `null` // Support CommonJS module // NOTE: Do not check typeof module.exports === 'object' since it will be // the Base constructor function after straps.js is included.