Skip to content

Commit 2d319fb

Browse files
Prevent circular loops of wrapping
1 parent 71f906a commit 2d319fb

5 files changed

Lines changed: 8242 additions & 2 deletions

File tree

WrappedPlugin/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ const construcNamesToWrap = [
4545
];
4646

4747
const wrap = (orig, pluginName, smp, addEndEvent) => {
48-
if (!orig) return orig;
48+
if (!orig || orig._smpWrapped) return orig;
49+
orig._smpWrapped = true;
4950

5051
const getOrigConstrucName = target =>
5152
target && target.constructor && target.constructor.name;

0 commit comments

Comments
 (0)