@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.esm.js CHANGED
@@ -11882,8 +11882,16 @@ var Element = /** @class */ (function (_super) {
11882
11882
  this.appendChild(newChild);
11883
11883
  }
11884
11884
  else {
11885
+ if (newChild.parentElement) {
11886
+ newChild.parentElement.removeChild(newChild);
11887
+ }
11885
11888
  var index = this.childNodes.indexOf(refChild);
11886
- this.appendChild(newChild, index - 1);
11889
+ if (index === -1) {
11890
+ this.appendChild(newChild);
11891
+ }
11892
+ else {
11893
+ this.appendChild(newChild, index);
11894
+ }
11887
11895
  }
11888
11896
  return newChild;
11889
11897
  };