Cleanup prototype references of built-ins and the _.isElement bizarro tests.

This commit is contained in:
John-David Dalton
2014-07-18 23:52:04 -07:00
parent 2f98cd9eb0
commit 60f57f9e4b
2 changed files with 67 additions and 48 deletions

View File

@@ -51,7 +51,10 @@
setProperty(Function.prototype, 'toString', (function() {
function wrapper() {
setProperty(Function.prototype, 'toString', fnToString);
var result = this === Set ? this.toString() : fnToString.call(this);
var result = (this === window.ArrayBuffer || this === window.Set)
? this.toString()
: fnToString.call(this);
setProperty(Function.prototype, 'toString', wrapper);
return result;
}