Skip to content

Commit

Permalink
fix: alert message bug
Browse files Browse the repository at this point in the history
  • Loading branch information
maryam4s26 committed Jan 24, 2024
1 parent eb96cd0 commit 54f7c28
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 54f7c28

Please sign in to comment.