diff --git a/packages/taro-runtime/src/hydrate.ts b/packages/taro-runtime/src/hydrate.ts index d04d9b6b2433..beae0ff281f1 100644 --- a/packages/taro-runtime/src/hydrate.ts +++ b/packages/taro-runtime/src/hydrate.ts @@ -81,6 +81,8 @@ export function hydrate (node: TaroElement | TaroText): MiniData { if (childNodes.length > 0) { data[Shortcuts.Childnodes] = childNodes.map(hydrate) + } else { + data[Shortcuts.Childnodes] = [] } if (node.className !== '') {