Merge "ve.ce.MWHeadingNode: Fix Uncaught TypeError: this.root is null"

This commit is contained in:
jenkins-bot 2021-08-28 15:58:11 +00:00 committed by Gerrit Code Review
commit 0d3f7941e6

View file

@ -37,7 +37,7 @@ ve.ce.MWHeadingNode.prototype.onSetup = function () {
ve.ce.MWHeadingNode.super.prototype.onSetup.call( this );
// Make reference to the surface
this.surface = this.root.getSurface().getSurface();
this.surface = this.root && this.root.getSurface().getSurface();
this.rebuildToc();
};