Bump to v3.5.0.

This commit is contained in:
jdalton
2015-03-08 18:09:08 -07:00
parent d01a1e4ef3
commit ee1f12c851
29 changed files with 117 additions and 71 deletions

View File

@@ -1,4 +1,5 @@
import createCtorWrapper from './createCtorWrapper';
import root from './root';
/**
* Creates a function that wraps `func` and invokes it with the `this`
@@ -13,7 +14,8 @@ function createBindWrapper(func, thisArg) {
var Ctor = createCtorWrapper(func);
function wrapper() {
return (this instanceof wrapper ? Ctor : func).apply(thisArg, arguments);
var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
return fn.apply(thisArg, arguments);
}
return wrapper;
}