Merge "Fix null error in ve.ui.MWTemplateDialog"

This commit is contained in:
jenkins-bot 2021-08-20 09:48:27 +00:00 committed by Gerrit Code Review
commit cdf7d907a9

View file

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