jeremy@jermolene.com 2023-01-11 08:57:54 +00:00
parent 7a4a8bd3f6
commit a45349cc99
1 changed files with 2 additions and 2 deletions

View File

@ -142,7 +142,7 @@ TranscludeWidget.prototype.collectSlotFillParameters = function() {
if(node.type === "fill") {
if(node.attributes["$name"] && node.attributes["$name"].type === "string") {
var slotValueName = node.attributes["$name"].value;
self.slotFillParseTrees[slotValueName] = node.children;
self.slotFillParseTrees[slotValueName] = node.children || [];
}
noFillWidgetsFound = false;
} else {
@ -349,7 +349,7 @@ TranscludeWidget.prototype.getTransclusionMetaParameters = function() {
Fetch the value of a slot
*/
TranscludeWidget.prototype.getTransclusionSlotFill = function(name,defaultParseTreeNodes) {
if(name && this.slotFillParseTrees[name]) {
if(name && this.slotFillParseTrees[name] && this.slotFillParseTrees[name].length > 0) {
return this.slotFillParseTrees[name];
} else {
return defaultParseTreeNodes || [];