mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 11:16:51 +00:00
Merge "Check surface exists when triggering toc rebuild"
This commit is contained in:
commit
67ca0bd32b
|
@ -46,7 +46,7 @@ ve.ce.MWHeadingNode.prototype.onTeardown = function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
ve.ce.MWHeadingNode.prototype.rebuildToc = function () {
|
ve.ce.MWHeadingNode.prototype.rebuildToc = function () {
|
||||||
if ( this.surface.mwTocWidget ) {
|
if ( this.surface && this.surface.mwTocWidget ) {
|
||||||
this.surface.mwTocWidget.rebuild();
|
this.surface.mwTocWidget.rebuild();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue