Skip to content

Commit

Permalink
Merge pull request #1 from hanzooo/fix-func
Browse files Browse the repository at this point in the history
fix: add proxy to avoid function properties miss
  • Loading branch information
hanzooo committed Mar 15, 2021
2 parents b5ff09e + 0cebbd5 commit 0654ce5
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 0654ce5

Please sign in to comment.