1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-02-02 12:19:11 +00:00

Fix problem when widgets don't have a parse tree node

This commit is contained in:
Jeremy Ruston 2013-10-27 22:53:06 +00:00
parent c7d56361ee
commit d84e398d7a

View File

@ -271,7 +271,7 @@ Make child widgets correspondng to specified parseTreeNodes
Widget.prototype.makeChildWidgets = function(parseTreeNodes) {
this.children = [];
var self = this;
$tw.utils.each(parseTreeNodes || this.parseTreeNode.children,function(childNode) {
$tw.utils.each(parseTreeNodes || (this.parseTreeNode && this.parseTreeNode.children),function(childNode) {
self.children.push(self.makeChildWidget(childNode));
});
};