@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.js CHANGED
@@ -3925,6 +3925,7 @@ const Popover = react.memo(react.forwardRef(function(props, forwardedRef) {
3925
3925
  }));
3926
3926
  Popover.displayName = "Memo(ForwardRef(Popover))";
3927
3927
  function getElementRef(element) {
3928
+ if (!element) return null;
3928
3929
  let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
3929
3930
  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);
3930
3931
  }