react-zoom-pan-pinch 3.4.1 → 3.4.3

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.cjs.js CHANGED
@@ -957,16 +957,9 @@ function makePassiveEventOption() {
957
957
  }
958
958
 
959
959
  var isExcludedNode = function (node, excluded) {
960
- var targetTagName = node.tagName.toUpperCase();
961
- var isExcludedTag = excluded.find(function (tag) { return tag.toUpperCase() === targetTagName; });
962
- if (isExcludedTag)
963
- return true;
964
- var isExcludedClassName = excluded.find(function (className) {
965
- return node.classList.contains(className);
960
+ return excluded.some(function (exclude) {
961
+ return node.matches("".concat(exclude, ", .").concat(exclude, ", ").concat(exclude, " *, .").concat(exclude, " *"));
966
962
  });
967
- if (isExcludedClassName)
968
- return true;
969
- return false;
970
963
  };
971
964
  var cancelTimeout = function (timeout) {
972
965
  if (timeout) {
@@ -1770,6 +1763,9 @@ var useResize = function (ref, onResize, dependencies) {
1770
1763
  React.useLayoutEffect(function () {
1771
1764
  var _a;
1772
1765
  didUnmount.current = false;
1766
+ if (!("ResizeObserver" in window)) {
1767
+ return;
1768
+ }
1773
1769
  if (ref) {
1774
1770
  resizeObserverRef.current = new ResizeObserver(function (entries) {
1775
1771
  var newSize = ref.getBoundingClientRect();