diff --git a/dist/lodash.compat.js b/dist/lodash.compat.js index 9ef6ed045..f8872c1ed 100644 --- a/dist/lodash.compat.js +++ b/dist/lodash.compat.js @@ -70,7 +70,7 @@ var reNoMatch = /($^)/; /** Used to detect functions containing a `this` reference */ - var reThis = (reThis = /\bthis\b/) && reThis.test(runInContext) && reThis; + var reThis = /\bthis\b/; /** Used to match unescaped characters in compiled string literals */ var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g; @@ -715,6 +715,15 @@ */ support.fastBind = nativeBind && !isV8; + /** + * Detect if functions can be decompiled by `Function#toString` + * (all but PS3 and older Opera mobile browsers & avoided in Windows 8 apps). + * + * @memberOf _.support + * @type boolean + */ + support.funcDecomp = !reNative.test(context.WinRTError) && reThis.test(runInContext); + /** * Detect if `Function#name` is supported (all but IE). * @@ -1070,7 +1079,7 @@ } if (support.funcNames || !bindData) { // checks if `func` references the `this` keyword and stores the result - bindData = !reThis || reThis.test(source); + bindData = !support.funcDecomp || reThis.test(source); setBindData(func, bindData); } } @@ -6056,8 +6065,8 @@ * // => 'hello mustache!' * * // using the `imports` option to import jQuery - * var list = '<% $.each(people, function(name) { %>