fix poly cleanup return

This commit is contained in:
Stewart Allen 2020-11-11 15:19:35 -05:00
commit 4ce40c1675
3 changed files with 4 additions and 3 deletions

View file

@ -1159,12 +1159,14 @@
clip = clib.Clipper,
clean = clip.CleanPolygon(this.toClipper()[0], CONF.clipperClean),
poly = fromClipperPath(clean, this.getZ());
if (poly.length === 0) return this;
if (deep && this.inner) {
poly.inner = this.inner.map(inr => inr.clean(false, poly));
}
poly.parent = parent || this.parent;
poly.area2 = this.area2;
return poly || this;
poly.open = this.open;
return poly;
};
PRO.toClipper = function(inout,debug) {