airbrake / airbrake-js

Airbrake JavaScript Notifier
https://airbrake.io
MIT License
422 stars 139 forks source link

@airbrake/browser has debugger; statement left in #947

Closed 321ckatz123 closed 3 years ago

321ckatz123 commented 3 years ago

🐞 bug report

Affected Package

The issue is caused by package @airbrake/browser

Is this a regression?

Yes, the previous version in which this bug was not present was: 1.4.2

Description

A debugger; statement was left in accidentally in v2.1.0.

This only appears to be in the dist of 2.1.0 as I cannot find it quickly in the source code, but if you look at base_notifier.js, it's here at line 52:

    function BaseNotifier(opt) {
        var _this = this;
        this._filters = [];
        this._performanceFilters = [];
        this._scope = new scope_1.Scope();
        this._onClose = [];
        if (!opt.projectId || !opt.projectKey) {
            throw new Error('airbrake: projectId and projectKey are required');
        }
        this._opt = opt;
        this._opt.host = this._opt.host || 'https://api.airbrake.io';
        this._opt.remoteConfigHost =
            this._opt.remoteConfigHost || 'https://notifier-configs.airbrake.io';
        this._opt.apmHost = this._opt.apmHost || 'https://api.airbrake.io';
        this._opt.timeout = this._opt.timeout || 10000;
        this._opt.keysBlocklist = this._opt.keysBlocklist || [/password/, /secret/];
        this._url = this._opt.host + "/api/v3/projects/" + this._opt.projectId + "/notices?key=" + this._opt.projectKey;
        this._opt.errorNotifications = this._opt.errorNotifications !== false;
        debugger;
        this._opt.performanceStats = this._opt.performanceStats !== false;
        this._opt.queryStats = this._opt.queryStats !== false;
        this._opt.queueStats = this._opt.queueStats !== false;
kyrylo commented 3 years ago

Blimey! Not sure how this happened, thanks for reporting! Should be fixed in https://www.npmjs.com/package/@airbrake/browser/v/2.1.1

321ckatz123 commented 3 years ago

Thanks @kyrylo