fix(runtime-core): mount children before setting element props
fix #1318, close #1320
This commit is contained in:
@@ -77,6 +77,12 @@ describe('test renderer', () => {
|
||||
})
|
||||
|
||||
expect(ops[1]).toEqual({
|
||||
type: NodeOpTypes.SET_ELEMENT_TEXT,
|
||||
text: 'hello',
|
||||
targetNode: root.children[0]
|
||||
})
|
||||
|
||||
expect(ops[2]).toEqual({
|
||||
type: NodeOpTypes.PATCH,
|
||||
targetNode: root.children[0],
|
||||
propKey: 'id',
|
||||
@@ -84,12 +90,6 @@ describe('test renderer', () => {
|
||||
propNextValue: 'test'
|
||||
})
|
||||
|
||||
expect(ops[2]).toEqual({
|
||||
type: NodeOpTypes.SET_ELEMENT_TEXT,
|
||||
text: 'hello',
|
||||
targetNode: root.children[0]
|
||||
})
|
||||
|
||||
expect(ops[3]).toEqual({
|
||||
type: NodeOpTypes.INSERT,
|
||||
targetNode: root.children[0],
|
||||
|
||||
Reference in New Issue
Block a user