mirror of
https://github.com/Tencent/Hippy.git
synced 2026-10-28 05:07:51 +08:00
fix(hippy-react): fixed insertBefore moveChild condition
This commit is contained in:
@@ -92,7 +92,7 @@ function insertBefore(
|
||||
child: Element,
|
||||
beforeChild: Element,
|
||||
): void {
|
||||
if (parent.childNodes.indexOf(child) > 0) {
|
||||
if (parent.childNodes.indexOf(child) >= 0) {
|
||||
// move it if the node has existed
|
||||
parent.moveChild(child, beforeChild);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user