mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 18:39:52 +00:00
DesktopArticleTarget: only destroy notices tool if it exists
Bug: T163813 Change-Id: Ib957eac2d3d407f8e683082938ec51d882c2d041
This commit is contained in:
parent
ca512cf4a1
commit
e1e89e8b14
|
@ -802,9 +802,11 @@ ve.init.mw.DesktopArticleTarget.prototype.surfaceReady = function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set edit notices, will be shown after meta dialog.
|
// Set edit notices, will be shown after meta dialog.
|
||||||
|
// Make sure notices actually exists, because this might be a mode-switch and
|
||||||
|
// we've already removed it.
|
||||||
if ( editNotices.length ) {
|
if ( editNotices.length ) {
|
||||||
actionTools.notices.setNotices( this.getEditNotices() );
|
actionTools.notices.setNotices( this.getEditNotices() );
|
||||||
} else {
|
} else if ( actionTools.notices ) {
|
||||||
actionTools.notices.destroy();
|
actionTools.notices.destroy();
|
||||||
actionTools.notices = null;
|
actionTools.notices = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue