Skip to content

Commit dde94bb

Browse files
Merge pull request #27 from stephencookdev/fix/circular-25
Prevent circular loops of wrapping
2 parents 71f906a + 2d319fb commit dde94bb

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)