Fix undefs

master
Vitaliy Filippov 2021-09-19 20:38:00 +03:00
parent 85a396fb9c
commit cee9239c22
1 changed files with 2 additions and 1 deletions

View File

@ -119,6 +119,7 @@ function walkTree(tree, visitor, context, options, path = '')
// Process array, remembering keys and indices within series of elements of the same type
let index = 0, series = 0;
let lastType = null, lastHasKey = false;
let res = [];
for (let item of tree)
{
if (item)
@ -174,7 +175,7 @@ function walkTree(tree, visitor, context, options, path = '')
const Component = getType(tree);
const visitChildren = (render, compInstance, elContext, childContext) =>
{
const result = visitor ? visitor(tree, compKey, compInstance, elContext, childContext) : true;
const result = visitor ? visitor(tree, path, compInstance, elContext, childContext) : true;
if (result !== false)
{
// A false wasn't returned so we will attempt to visit the children