Fixed problem with renderer tree nodes that don't have children

print-window-tiddler
Jeremy Ruston 2012-12-15 17:34:48 +00:00
rodzic e3462e5606
commit 6ac1b7b9dc
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -36,8 +36,10 @@ Create an array of renderers for an array of parse tree nodes
*/
WikiRenderTree.prototype.createRenderers = function(renderContext,parseTreeNodes) {
var rendererNodes = [];
for(var t=0; t<parseTreeNodes.length; t++) {
rendererNodes.push(this.createRenderer(renderContext,parseTreeNodes[t]));
if(parseTreeNodes) {
for(var t=0; t<parseTreeNodes.length; t++) {
rendererNodes.push(this.createRenderer(renderContext,parseTreeNodes[t]));
}
}
return rendererNodes;
};