@annotorious/annotorious 3.4.6 → 3.4.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@annotorious/annotorious",
3
- "version": "3.4.6",
3
+ "version": "3.4.7",
4
4
  "description": "Add image annotation functionality to any web page with a few lines of JavaScript",
5
5
  "author": "Rainer Simon",
6
6
  "license": "BSD-3-Clause",
@@ -49,7 +49,7 @@
49
49
  "vitest": "^3.1.4"
50
50
  },
51
51
  "dependencies": {
52
- "@annotorious/core": "3.4.6",
52
+ "@annotorious/core": "3.4.7",
53
53
  "dequal": "^2.0.3",
54
54
  "rbush": "^4.0.1",
55
55
  "simplify-js": "^1.2.4",
@@ -71,7 +71,9 @@ export const createImageAnnotatorState = <I extends Annotation, E extends unknow
71
71
  }
72
72
 
73
73
  const getIntersecting = (x: number, y: number, width: number, height: number) =>
74
- tree.getIntersecting(x, y, width, height).map(target => store.getAnnotation(target.annotation) as I);
74
+ tree.getIntersecting(x, y, width, height)
75
+ .map(target => store.getAnnotation(target.annotation) as I)
76
+ .filter(Boolean); // Race conditions may have deleted annotations concurrently
75
77
 
76
78
  return {
77
79
  store: {