@floating-ui/core@1.0.2
Bug Fixes
-
fix: if the
reference
orfloating
elements are falsy/null
whencomputePosition()
is called there's an unhelpful error aboutgetComputedStyle
; there is now a proper error message in dev mode. (#1954) -
fix: the
middleware
array can now containfalse
,null
, orundefined
values. This enables you to pass conditional middleware inline without needing a verbose spread...(cond ? [m()] : [])
or separate statements like.push()
— at least for TypeScript, as you could already filter it manually externally. (#1954)middleware: [ shouldFlip && flip(), arrowElement && arrow({ element: arrowElement }), ]