primereact 9.6.3 → 9.6.5

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/primereact.all.js CHANGED
@@ -2961,7 +2961,6 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
2961
2961
  when = _ref$when === void 0 ? true : _ref$when;
2962
2962
  var targetRef = React__namespace.useRef(null);
2963
2963
  var listenerRef = React__namespace.useRef(null);
2964
- var prevListener = usePrevious(listener);
2965
2964
  var prevOptions = usePrevious(options);
2966
2965
  var bind = function bind() {
2967
2966
  var bindOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -2991,12 +2990,11 @@ var primereact = (function (exports, React, reactTransitionGroup, ReactDOM) {
2991
2990
  }
2992
2991
  }, [target, when]);
2993
2992
  React__namespace.useEffect(function () {
2994
- // to properly compare functions we can implicitly converting the function to it's body's text as a String
2995
- if (listenerRef.current && ('' + prevListener !== '' + listener || prevOptions !== options)) {
2993
+ if (listenerRef.current && (listenerRef.current !== listener || prevOptions !== options)) {
2996
2994
  unbind();
2997
2995
  when && bind();
2998
2996
  }
2999
- }, [listener, options, when]);
2997
+ }, [listener, options]);
3000
2998
  useUnmountEffect(function () {
3001
2999
  unbind();
3002
3000
  });