react-zoom-pan-pinch 3.1.0 → 3.1.1

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
@@ -1674,6 +1674,9 @@ var TransformWrapper = React.forwardRef(function (props, ref) {
1674
1674
  useImperativeHandle(ref, function () { return getControls(instance); }, [instance]);
1675
1675
  useEffect(function () {
1676
1676
  instance.update(props);
1677
+ return function () {
1678
+ instance.cleanupWindowEvents();
1679
+ };
1677
1680
  }, [instance, props]);
1678
1681
  return React.createElement(Context.Provider, { value: instance }, content);
1679
1682
  });