mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-04 18:58:37 +00:00
Merge "Fix null error in ve.ui.MWTemplateDialog"
This commit is contained in:
commit
cdf7d907a9
|
@ -113,7 +113,8 @@ ve.ui.MWTemplateDialog.prototype.onReplacePart = function ( removed, added ) {
|
|||
removed.disconnect( this );
|
||||
}
|
||||
if ( this.loaded && !this.preventReselection && partPage.isActive() ) {
|
||||
reselect = this.bookletLayout.findClosestPage( partPage ).getName();
|
||||
var closestPage = this.bookletLayout.findClosestPage( partPage );
|
||||
reselect = closestPage && closestPage.getName();
|
||||
}
|
||||
removePages.push( partPage );
|
||||
this.bookletLayout.removePages( removePages );
|
||||
|
|
Loading…
Reference in a new issue