From 8fc14584675a236b192c3630fa0daea823e17a2b Mon Sep 17 00:00:00 2001 From: David Sevilla Martin Date: Wed, 6 Nov 2019 17:20:53 -0500 Subject: [PATCH] Cleanup some code and fix alert dismiss not working --- framework/core/js/src/common/Application.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/framework/core/js/src/common/Application.js b/framework/core/js/src/common/Application.js index 4957d5ce8..6267328d5 100644 --- a/framework/core/js/src/common/Application.js +++ b/framework/core/js/src/common/Application.js @@ -330,12 +330,14 @@ export default class Application { children = app.translator.trans('core.lib.error.generic_message'); } + const isDebug = app.forum.attribute('debug'); + error.alert = new Alert({ type: 'error', children, - controls: app.forum.attribute('debug') ? [ + controls: isDebug && [ - ] : undefined + ] }); try { @@ -355,7 +357,7 @@ export default class Application { * @private */ showDebug(error) { - this.alerts.dismiss(this.requestErrorAlert); + this.alerts.dismiss(this.requestError.alert); this.modal.show(new RequestErrorModal({error})); }