jenkins-bot has submitted this change and it was merged. Change subject: Bug 57707: Hotfix, don't push undefined onto wikitext array ......................................................................
Bug 57707: Hotfix, don't push undefined onto wikitext array This might have been broken in 283bfd55, but this patch just works around the breakage for now by not pushing undefined onto the wikitext array. Proper investigation and fix to be done. Change-Id: Ic1706c8da69c0046b1acd39f1e8b3de55a3fee92 --- M js/lib/ext.core.AttributeExpander.js 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/js/lib/ext.core.AttributeExpander.js b/js/lib/ext.core.AttributeExpander.js index 6fe2322..2f5aa82 100644 --- a/js/lib/ext.core.AttributeExpander.js +++ b/js/lib/ext.core.AttributeExpander.js @@ -34,7 +34,7 @@ if ([TagTk, SelfclosingTagTk].indexOf(token.constructor) !== -1) { // Strip all meta tags. if (wrapTemplates) { - if (inInclude) { + if (inInclude && token.dataAttribs.src) { wikitext.push(token.dataAttribs.src); } @@ -46,7 +46,9 @@ inTpl = typeMatch[1].match(/Transclusion|Param|Extension/); inInclude = !inTpl; hasGeneratedContent = true; - wikitext.push(token.dataAttribs.src); + if (token.dataAttribs.src) { + wikitext.push(token.dataAttribs.src); + } } else { inTpl = false; inInclude = false; -- To view, visit https://gerrit.wikimedia.org/r/99022 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic1706c8da69c0046b1acd39f1e8b3de55a3fee92 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: GWicke <gwi...@wikimedia.org> Gerrit-Reviewer: Subramanya Sastry <ssas...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits