ce.MWTransclusionNode: make sure model exists before getting its document

Bug: T168932
Change-Id: I8d458888ed0b80205ce17b41f3506410c550630f
This commit is contained in:
David Lynch 2017-07-24 11:31:19 -05:00
parent 6dec360659
commit 0e973e2539

View file

@ -189,7 +189,7 @@ ve.ce.MWTransclusionNode.prototype.getRenderedDomElements = function () {
// Parent method
var elements = ve.ce.GeneratedContentNode.prototype.getRenderedDomElements.apply( this, arguments );
if ( this.getModelHtmlDocument() ) {
if ( this.model && this.getModelHtmlDocument() ) {
ve.init.platform.linkCache.styleParsoidElements(
$( elements ),
this.getModelHtmlDocument()