diff --git a/packages/runtime-core/__tests__/fragment.spec.ts b/packages/runtime-core/__tests__/fragment.spec.ts index 17488df5..e558a741 100644 --- a/packages/runtime-core/__tests__/fragment.spec.ts +++ b/packages/runtime-core/__tests__/fragment.spec.ts @@ -80,7 +80,7 @@ describe('Fragments', () => { render() { return state.ok ? [h('div', 'one'), 'two'] - : [h('div', 'foo'), 'bar', 'baz'] + : [h('pre', 'foo'), 'bar', 'baz'] } } const root = nodeOps.createElement('div') @@ -90,7 +90,7 @@ describe('Fragments', () => { state.ok = false await nextTick() - expect(serialize(root)).toBe(`
foo
barbaz
`) + expect(serialize(root)).toBe(`
foo
barbaz
`) }) it('should be able to patch fragment children (explcitly keyed)', async () => { diff --git a/packages/runtime-core/src/createRenderer.ts b/packages/runtime-core/src/createRenderer.ts index 9e90371b..354450d9 100644 --- a/packages/runtime-core/src/createRenderer.ts +++ b/packages/runtime-core/src/createRenderer.ts @@ -164,14 +164,14 @@ export function createRenderer(options: RendererOptions) { if (childFlags !== ChildrenFlags.NO_CHILDREN) { const hasSVGChildren = isSVG && tag !== 'foreignObject' if (childFlags & ChildrenFlags.SINGLE_VNODE) { - mount(children as VNode, el, contextVNode, hasSVGChildren, endNode) + mount(children as VNode, el, contextVNode, hasSVGChildren, null) } else if (childFlags & ChildrenFlags.MULTIPLE_VNODES) { mountArrayChildren( children as VNode[], el, contextVNode, hasSVGChildren, - endNode + null ) } }