Skip to content

Commit 9b914eb

Browse files
committed
consoleLogs fix
1 parent a4b6516 commit 9b914eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/catcher.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ export default class Catcher {
513513
const userAgent = window.navigator.userAgent;
514514
const location = window.location.href;
515515
const getParams = this.getGetParams();
516-
const consoleLogs = this.consoleTracking ? getConsoleLogStack() : [];
516+
const consoleLogs = this.consoleTracking && getConsoleLogStack();
517517

518518
const addons: JavaScriptAddons = {
519519
window: {
@@ -532,7 +532,7 @@ export default class Catcher {
532532
addons.RAW_EVENT_DATA = this.getRawData(error);
533533
}
534534

535-
if (consoleLogs.length > 0) {
535+
if (consoleLogs && consoleLogs.length > 0) {
536536
addons.consoleOutput = consoleLogs;
537537
}
538538

0 commit comments

Comments
 (0)