diff options
-rw-r--r-- | src/modules.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/modules.js b/src/modules.js index 60a3dd68..0c1d24bc 100644 --- a/src/modules.js +++ b/src/modules.js @@ -453,18 +453,14 @@ var LibraryManager = { var target = x; while (typeof lib[target] === 'string') { if (lib[target].indexOf('(') >= 0) continue libloop; + if (lib[target].indexOf('Math_') == 0) continue libloop; target = lib[target]; } if (lib[target + '__asm']) continue; // This is an alias of an asm library function. Also needs to be fully optimized. if (typeof lib[target] === 'undefined' || typeof lib[target] === 'function') { - if (target.indexOf('Math_') < 0) { - lib[x] = new Function('return _' + target + '.apply(null, arguments)'); - if (!lib[x + '__deps']) lib[x + '__deps'] = []; - lib[x + '__deps'].push(target); - } else { - lib[x] = new Function('return ' + target + '.apply(null, arguments)'); - } - continue; + lib[x] = new Function('return _' + target + '.apply(null, arguments)'); + if (!lib[x + '__deps']) lib[x + '__deps'] = []; + lib[x + '__deps'].push(target); } } } |