Bump to v3.5.0.

This commit is contained in:
John-David Dalton
2015-12-16 17:48:35 -08:00
parent 4ce1d5ddd3
commit 707fe171fc
29 changed files with 196 additions and 124 deletions

View File

@@ -1,4 +1,4 @@
define(['./createCtorWrapper'], function(createCtorWrapper) {
define(['./createCtorWrapper', './root'], function(createCtorWrapper, root) {
/**
* Creates a function that wraps `func` and invokes it with the `this`
@@ -13,7 +13,8 @@ define(['./createCtorWrapper'], function(createCtorWrapper) {
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;
}