@annotorious/annotorious 3.1.2 → 3.1.4

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.
@@ -2810,9 +2810,14 @@ function oi(e, t, n) {
2810
2810
  }
2811
2811
  }, p = () => {
2812
2812
  if (!f) return;
2813
- const w = [...u, f], E = {
2813
+ const w = u.slice(0, -1);
2814
+ if (w.length < 3) return;
2815
+ const E = {
2814
2816
  type: F.POLYGON,
2815
- geometry: { bounds: qe(w), points: w }
2817
+ geometry: {
2818
+ bounds: qe(u),
2819
+ points: w
2820
+ }
2816
2821
  };
2817
2822
  ht(E) > 4 && (n(0, u = []), n(1, f = void 0), i("create", E));
2818
2823
  }, _ = () => {