@sanity/ui 2.9.0-canary.1 → 2.9.0-canary.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
@@ -3931,6 +3931,7 @@ const Popover = memo(forwardRef(function(props, forwardedRef) {
3931
3931
  }));
3932
3932
  Popover.displayName = "Memo(ForwardRef(Popover))";
3933
3933
  function getElementRef(element) {
3934
+ if (!element) return null;
3934
3935
  let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
3935
3936
  return mayWarn ? element.ref : (getter = Object.getOwnPropertyDescriptor(element, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning, mayWarn ? element.props.ref : element.props.ref || element.ref);
3936
3937
  }