tyxml-lwd: reinsert only if necessary

This commit is contained in:
Frédéric Bour 2020-10-08 16:41:30 +02:00
parent 9e60a3fecf
commit 1fb659ad44
1 changed files with 2 additions and 1 deletions

View File

@ -53,7 +53,8 @@ let update_children (self : raw_node) (children : raw_node live) : unit Lwd.t =
| Some tree ->
let rec update acc = function
| Leaf x ->
ignore (self##insertBefore x acc);
if x##.nextSibling != acc || x##.parentNode != Js.some self then
ignore (self##insertBefore x acc);
Js.some x
| Inner t ->
if Js.Opt.test t.bound then t.bound else (