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
This commit is contained in:
Thiemo Kreuz 2022-07-25 13:52:21 +02:00
parent 576f27e3d5
commit 59c2ee6242

View file

@ -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();