From eb96cd0765f13d9bf1ad9865b74f555314b39714 Mon Sep 17 00:00:00 2001 From: Maryam Saleh Date: Tue, 23 Jan 2024 14:43:10 +0330 Subject: [PATCH 1/2] fix: alert message bug --- src/dialogs/alert.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dialogs/alert.js b/src/dialogs/alert.js index 603a261..742e054 100644 --- a/src/dialogs/alert.js +++ b/src/dialogs/alert.js @@ -85,7 +85,7 @@ export default class AlertDialog extends Dialog { if (this.args.type === 'error') { const {error} = this.args; const msg = error instanceof Error - ? (error.stack ? error.stack : error) + ? (error.message ? error.message : error) : String(error); children.push(h(TextareaField, {value: msg, readonly: true, placeholder: this.args.message})); From 54f7c28fa6d27c16626b7eaf6be94264e74e75ad Mon Sep 17 00:00:00 2001 From: Maryam Saleh Date: Wed, 24 Jan 2024 22:43:34 +0330 Subject: [PATCH 2/2] fix: alert message bug --- src/dialogs/alert.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/dialogs/alert.js b/src/dialogs/alert.js index 742e054..41fa5dc 100644 --- a/src/dialogs/alert.js +++ b/src/dialogs/alert.js @@ -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})); }