Skip to content

Commit

Permalink
Merge 3a2d5f0 into cb0f582
Browse files Browse the repository at this point in the history
  • Loading branch information
neico committed Aug 29, 2015
2 parents cb0f582 + 3a2d5f0 commit aaf7d7d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Expand Up @@ -95,8 +95,9 @@ function ProxyShim(target, handler) {
return Proxy.create(oldHandler, Object.getPrototypeOf(target));
return Proxy.createFunction(
oldHandler,
handler.apply && function () {
return handler.apply(target, this, Array.prototype.slice.call(arguments));
function () {
if(handler.apply) return handler.apply(target, this, Array.prototype.slice.call(arguments))
return target.apply(this, Array.prototype.slice.call(arguments));
},
handler.construct && function () {
return handler.construct(target, Array.prototype.slice.call(arguments));
Expand Down

0 comments on commit aaf7d7d

Please sign in to comment.