@7shifts/sous-chef 3.65.0-beta.1 → 3.65.1-beta.0
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.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +3 -1
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13829,6 +13829,7 @@ function useViewPortIntersectionObserver() {
|
|
|
13829
13829
|
* @returns {IsVisibleInViewPortResult}
|
|
13830
13830
|
*/
|
|
13831
13831
|
function useIsVisibleInViewPort() {
|
|
13832
|
+
var _process;
|
|
13832
13833
|
var wrapperRef = React.useRef(null);
|
|
13833
13834
|
var _useState = React.useState(false),
|
|
13834
13835
|
isVisible = _useState[0],
|
|
@@ -13848,8 +13849,9 @@ function useIsVisibleInViewPort() {
|
|
|
13848
13849
|
setIsVisible(false);
|
|
13849
13850
|
wrapperRef.current = target;
|
|
13850
13851
|
}, [observeElement, unobserveElement]);
|
|
13852
|
+
var isJestEnvironment = typeof process !== 'undefined' && ((_process = process) == null || (_process = _process.env) == null ? void 0 : _process.JEST_WORKER_ID) !== undefined;
|
|
13851
13853
|
return {
|
|
13852
|
-
isVisible: isVisible,
|
|
13854
|
+
isVisible: isJestEnvironment ? true : isVisible,
|
|
13853
13855
|
elementRef: handleRefUpdate
|
|
13854
13856
|
};
|
|
13855
13857
|
}
|