fix(runtime-core): enable block tracking when normalizing plain element with slot children (#1987)

fix #1980
This commit is contained in:
HcySunYang
2020-09-02 00:38:47 +08:00
committed by GitHub
parent 706b52aadd
commit 5b82c48c7b
5 changed files with 71 additions and 12 deletions

View File

@@ -130,10 +130,10 @@ describe('vnode', () => {
})
test('object', () => {
const vnode = createVNode('p', null, { foo: 'foo' })
const vnode = createVNode({}, null, { foo: 'foo' })
expect(vnode.children).toMatchObject({ foo: 'foo' })
expect(vnode.shapeFlag).toBe(
ShapeFlags.ELEMENT | ShapeFlags.SLOTS_CHILDREN
ShapeFlags.STATEFUL_COMPONENT | ShapeFlags.SLOTS_CHILDREN
)
})