Skip to content

Commit

Permalink
Merge pull request stephencookdev#163 from hanzooo/master
Browse files Browse the repository at this point in the history
fix: avoid function properties lost
  • Loading branch information
stephencookdev committed Mar 28, 2021
2 parents c1a1ec6 + ca66853 commit 05053d5
Show file tree
Hide file tree
Showing 4 changed files with 6,723 additions and 1 deletion.
7 changes: 6 additions & 1 deletion WrappedPlugin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,12 @@ const wrap = (orig, pluginName, smp, addEndEvent) => {
Object.defineProperty(ret, "name", {
value: raw.name,
});
return ret;
const funcProxy = new Proxy(ret, {
get: (target, property) => {
return raw[property];
},
});
return funcProxy;
}

return raw;
Expand Down
Loading

0 comments on commit 05053d5

Please sign in to comment.