@knaw-huc/osd-iiif-viewer 0.1.11 → 0.1.12

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2047,7 +2047,7 @@ function Overlay({ location, children }) {
2047
2047
  return useEffect(() => {
2048
2048
  if (viewer)
2049
2049
  return viewer.addOverlay({ element: container, location }), () => {
2050
- viewer.removeOverlay(container);
2050
+ viewer.isOpen() && viewer.removeOverlay(container);
2051
2051
  };
2052
2052
  }, [viewer, location, container]), viewer ? createPortal(children, container) : null;
2053
2053
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knaw-huc/osd-iiif-viewer",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/knaw-huc/osd-iiif-viewer.git"