From 54f7c28fa6d27c16626b7eaf6be94264e74e75ad Mon Sep 17 00:00:00 2001 From: Maryam Saleh Date: Wed, 24 Jan 2024 22:43:34 +0330 Subject: [PATCH] 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})); }