orcs-design-system 2.1.17 → 2.1.18

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.
@@ -36,9 +36,14 @@ export var oppositeDirection = function oppositeDirection(direction) {
36
36
  var isWithinRootBounds = function isWithinRootBounds(intersectionObserverEntry) {
37
37
  var rootBounds = intersectionObserverEntry.rootBounds;
38
38
  var intersectionRect = intersectionObserverEntry.intersectionRect;
39
- var topDiff = intersectionRect.top - rootBounds.top;
40
- var bottomDiff = rootBounds.bottom - intersectionRect.bottom;
41
- return topDiff > ROOT_BOUNDS.top && bottomDiff > ROOT_BOUNDS.bottom;
39
+
40
+ if (rootBounds && intersectionRect) {
41
+ var topDiff = intersectionRect.top - rootBounds.top;
42
+ var bottomDiff = rootBounds.bottom - intersectionRect.bottom;
43
+ return topDiff > ROOT_BOUNDS.top && bottomDiff > ROOT_BOUNDS.bottom;
44
+ }
45
+
46
+ return true;
42
47
  };
43
48
  /**
44
49
  * This hook keeps track of the in view status of a component that has a direction setting, like a Popover or ActionsMenu.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orcs-design-system",
3
- "version": "2.1.17",
3
+ "version": "2.1.18",
4
4
  "description": "Orchestrated's Design System, aka: ORCS",
5
5
  "keywords": [
6
6
  "design",