Skip to content

Commit d93f613

Browse files
authored
Update pm-log-capture.js
1 parent 5ac3bb4 commit d93f613

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib/pm-log-capture.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,12 @@ if (!String(window.location.href).startsWith(`http://localhost:`)) {
221221
if (browserHasStack) stack = parseStack(new Error().stack);
222222
push(name, args, stack);
223223
item.apply(console, args);
224+
225+
const err = new Error();
226+
if (Error.captureStackTrace) {
227+
Error.captureStackTrace(err, window.console[name]);
228+
}
229+
item.apply(console, [...args, err]);
224230
};
225231
}
226232
}

0 commit comments

Comments
 (0)