Remove undefined from the IIFE to allow easier customizations with the iife build option.

Former-commit-id: a496b1fba74fdab3b2819d27b769371f73364684
This commit is contained in:
John-David Dalton
2013-02-23 14:08:48 -08:00
parent 1ad2c92324
commit 756587d080
3 changed files with 17 additions and 14 deletions

View File

@@ -353,7 +353,7 @@
source = source.replace(license, '');
}
var hasIIFE = /^;?\(function[^{]+{\s*/.test(source),
var hasIIFE = /^;?\(function[^{]+{/.test(source),
isStrict = hasIIFE && /^;?\(function[^{]+{\s*["']use strict["']/.test(source);
// to avoid stripping the IIFE, convert it to a function call