Revert accidental condition sequence change.

`typeof module` needs to come before 2nd condition.
This commit is contained in:
Jürg Lehni 2017-03-10 23:21:21 +01:00
parent 69fb23d2ed
commit 62a0c9c36b

View file

@ -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.