Skip to content

Commit 0f79675

Browse files
committed
dev
1 parent 2784e9b commit 0f79675

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/catcher.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ export default class Catcher {
144144

145145
if (!settings.disableConsoleLogHandler) {
146146
initConsoleCatcher();
147-
console.log('Console log handler initialized');
148147
}
149148

150149
/**
@@ -246,7 +245,9 @@ export default class Catcher {
246245
* Add error to console logs
247246
*/
248247

249-
addErrorEvent(event);
248+
if (!this.disableConsoleLogHandler) {
249+
addErrorEvent(event);
250+
}
250251

251252
/**
252253
* Promise rejection reason is recommended to be an Error, but it can be a string:
@@ -512,7 +513,7 @@ export default class Catcher {
512513
const userAgent = window.navigator.userAgent;
513514
const location = window.location.href;
514515
const getParams = this.getGetParams();
515-
const consoleLogs = getConsoleLogStack();
516+
const consoleLogs = !this.disableConsoleLogHandler ? getConsoleLogStack() : [];
516517

517518
const addons: JavaScriptAddons = {
518519
window: {

0 commit comments

Comments
 (0)