From 59c2ee624249e96d07bee0ea309edc63b7dd7526 Mon Sep 17 00:00:00 2001 From: Thiemo Kreuz Date: Mon, 25 Jul 2022 13:52:21 +0200 Subject: [PATCH] Add missing check to confirmation dialog's "closed" handler Apparently this can be undefined when Esc is pressed. Note this code cleanup related to but does not fix T313690. Bug: T313690 Change-Id: Ia4658f8e00a68ed4cc3a6ddb0a932b3218b813dc --- modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js index 88c1c2f4ee..5c864dca95 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js @@ -345,7 +345,7 @@ ve.ui.MWTemplateDialog.prototype.checkRequiredParameters = function () { blankRequired.length ) } ).closed.then( function ( data ) { - if ( data.action === 'ok' ) { + if ( data && data.action === 'ok' ) { deferred.resolve(); } else { deferred.reject();