@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 +1 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/core/primitives/popover/popover.tsx +2 -1
package/package.json
CHANGED
|
@@ -443,7 +443,8 @@ Popover.displayName = 'Memo(ForwardRef(Popover))'
|
|
|
443
443
|
// https://github.com/facebook/react/pull/28348
|
|
444
444
|
//
|
|
445
445
|
// Access the ref using the method that doesn't yield a warning.
|
|
446
|
-
function getElementRef(element
|
|
446
|
+
function getElementRef(element?: React.ReactElement) {
|
|
447
|
+
if (!element) return null
|
|
447
448
|
// React <=18 in DEV
|
|
448
449
|
let getter = Object.getOwnPropertyDescriptor(element.props, 'ref')?.get
|
|
449
450
|
let mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning
|