Skip to content

Commit

Permalink
🌀
Browse files Browse the repository at this point in the history
  • Loading branch information
hcodes committed Sep 8, 2024
1 parent 6f14096 commit 26904c5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions dist/ShowJSError.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export interface ShowJSErrorSettings {
reportUrl?: string;
templateDetailedMessage?: string;
size?: 'big' | 'normal';
errorFilter?: (error: ExtendedError) => boolean;
}
export interface ShowJSErrorElems {
actions: HTMLDivElement;
Expand Down
4 changes: 4 additions & 0 deletions dist/show-js-error.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,13 @@ var ShowJSError = /** @class */ (function () {
size: settings.size || 'normal',
reportUrl: settings.reportUrl || '',
templateDetailedMessage: settings.templateDetailedMessage || '',
errorFilter: settings.errorFilter || function () { return true; },
};
};
ShowJSError.prototype.pushError = function (error) {
if (!this.settings.errorFilter(error)) {
return;
}
this.state.errorBuffer.push(error);
this.state.errorIndex = this.state.errorBuffer.length - 1;
this.updateUI();
Expand Down
4 changes: 4 additions & 0 deletions dist/show-js-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,13 @@
size: settings.size || 'normal',
reportUrl: settings.reportUrl || '',
templateDetailedMessage: settings.templateDetailedMessage || '',
errorFilter: settings.errorFilter || function () { return true; },
};
};
ShowJSError.prototype.pushError = function (error) {
if (!this.settings.errorFilter(error)) {
return;
}
this.state.errorBuffer.push(error);
this.state.errorIndex = this.state.errorBuffer.length - 1;
this.updateUI();
Expand Down

0 comments on commit 26904c5

Please sign in to comment.