mediawiki-extensions-Visual.../modules/ve-mw/ui
Thiemo Kreuz 2966b69609 Fix possibly uninitialized variable in template dialog
There is a codepath where `modelPromise` is undefined and
calling `modelPromise.then()` fails. This codepath implies
that the dialog is empty and there is nothing to update. We
can just close the dialog then.

I found this while debugging the actions in this dialog.
This happens when the dialog is empty (except for a
placeholder) but you submit it anyway. This is typically
not possible as the button is supposed to be disabled.
Still I think it's a good idea to make this code less
fragile.

The relevant code was introduced in Ibc2fc66 (2016).

Change-Id: Ia6b723548456c211b944a2320949bfc23b0afa16
2021-06-25 16:49:30 +02:00
..
actions
commands
contextitems Remove @param/@return docs that literally repeat the code 2021-06-14 15:44:51 +02:00
datatransferhandlers
dialogs Fix possibly uninitialized variable in template dialog 2021-06-25 16:49:30 +02:00
elements
inspectors Remove @param/@return docs that literally repeat the code 2021-06-14 15:44:51 +02:00
pages Inline many var declarations in the code below 2021-06-23 09:02:24 +00:00
styles Label for each template in sidebar 2021-06-24 12:50:05 +02:00
tools Inline many var declarations in the code below 2021-06-23 09:02:24 +00:00
widgets Merge "Label for each template in sidebar" 2021-06-24 12:34:52 +00:00
ve.ui.MWCommandRegistry.js
ve.ui.MWExtensionWindow.js
ve.ui.MWSequenceRegistry.js
ve.ui.MWSurface.js
ve.ui.MWTransclusionsBooklet.js Method for getting the currently selected element 2021-06-10 15:32:07 +02:00
ve.ui.MWWikitextCommandRegistry.js
ve.ui.MWWikitextDataTransferHandlerFactory.js
ve.ui.MWWikitextSequenceRegistry.js
ve.ui.MWWikitextSurface.js
ve.ui.MWWikitextTransferRegistry.js