@bpmn-io/properties-panel 1.8.1 → 1.8.2

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
@@ -393,6 +393,11 @@ function useStickyIntersectionObserver(ref, scrollContainerSelector, setSticky)
393
393
  let observer;
394
394
  if (ref.current) {
395
395
  const scrollContainer = query(scrollContainerSelector);
396
+
397
+ // TODO(@barmac): test this
398
+ if (!scrollContainer) {
399
+ return;
400
+ }
396
401
  observer = new Observer(entries => {
397
402
  // The ScrollContainer is unmounted, do not update sticky state
398
403
  if (scrollContainer.scrollHeight === 0) {
@@ -420,7 +425,7 @@ function useStickyIntersectionObserver(ref, scrollContainerSelector, setSticky)
420
425
  observer.unobserve(ref.current);
421
426
  }
422
427
  };
423
- }, [ref, scrollContainerSelector, setSticky]);
428
+ }, [ref.current, scrollContainerSelector, setSticky]);
424
429
  }
425
430
 
426
431
  /**