Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
Signed-off-by: Olga Bulat <[email protected]>
  • Loading branch information
obulat committed Dec 7, 2023
1 parent 387b25e commit c6457fe
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frontend/src/composables/use-floating-ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ export function useFloatingUi({ floatingElRef, floatingPropsRefs }: Props) {
cleanup.value?.()
return
}
if (!visible) return
if (!visible) {
return
}

cleanup.value = buildAutoUpdate(triggerElement, floatingElement)

Expand All @@ -92,7 +94,9 @@ export function useFloatingUi({ floatingElRef, floatingPropsRefs }: Props) {
const detectMaxHeight = {
name: "detectMaxHeight",
async fn(state: MiddlewareState) {
if (!floatingPropsRefs.clippable.value) return {}
if (!floatingPropsRefs.clippable.value) {
return {}
}
const overflow = await detectOverflow(state, { padding: FloatingOffset })
const verticalOverflow = Math.max(overflow.top, overflow.bottom)

Expand Down

0 comments on commit c6457fe

Please sign in to comment.