Skip to content

Commit 929b11a

Browse files
committed
fix: wrong child order
1 parent 8939f7c commit 929b11a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

platform/nativescript/renderer/ViewNode.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export default class ViewNode {
207207
referenceNode.prevSibling = childNode
208208
this.childNodes.splice(index, 0, childNode)
209209

210-
viewUtil.insertChild(this, childNode, index === 0 ? 0 : index - 1)
210+
viewUtil.insertChild(this, childNode, index)
211211
}
212212

213213
appendChild(childNode) {
@@ -238,7 +238,7 @@ export default class ViewNode {
238238

239239
this.childNodes.push(childNode)
240240

241-
viewUtil.insertChild(this, childNode, this.childNodes.length - 1)
241+
viewUtil.insertChild(this, childNode)
242242
}
243243

244244
removeChild(childNode) {

0 commit comments

Comments
 (0)