@antv/g-lite 1.2.16 → 1.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -11903,8 +11903,16 @@ var Element = /** @class */ (function (_super) {
11903
11903
  this.appendChild(newChild);
11904
11904
  }
11905
11905
  else {
11906
+ if (newChild.parentElement) {
11907
+ newChild.parentElement.removeChild(newChild);
11908
+ }
11906
11909
  var index = this.childNodes.indexOf(refChild);
11907
- this.appendChild(newChild, index - 1);
11910
+ if (index === -1) {
11911
+ this.appendChild(newChild);
11912
+ }
11913
+ else {
11914
+ this.appendChild(newChild, index);
11915
+ }
11908
11916
  }
11909
11917
  return newChild;
11910
11918
  };