Skip to content

Commit

Permalink
fix: alert message bug
Browse files Browse the repository at this point in the history
  • Loading branch information
maryam4s26 authored and andersevenrud committed Jan 25, 2024
1 parent 2df60dc commit a088171
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/dialogs/alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ export default class AlertDialog extends Dialog {

if (this.args.type === 'error') {
const {error} = this.args;
const msg = error instanceof Error
? (error.message ? error.message : error)
: String(error);
const msg = error instanceof Error ? `${error.message}\n\n${error.stack || 'No stack'}` : error;

children.push(h(TextareaField, {value: msg, readonly: true, placeholder: this.args.message}));
}
Expand Down

0 comments on commit a088171

Please sign in to comment.