Skip to content

Commit

Permalink
refactor(VSpeedDial): fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
KaelWD committed Aug 15, 2024
1 parent 08c3d4f commit 4077948
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/vuetify/src/components/VSpeedDial/VSpeedDial.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { computed, ref } from 'vue'
import { genericComponent, propsFactory, useRender } from '@/util'

// Types
import type { ComputedRef } from 'vue'
import type { OverlaySlots } from '@/components/VOverlay/VOverlay'
import type { Anchor } from '@/util'

Expand Down Expand Up @@ -45,11 +44,11 @@ export const VSpeedDial = genericComponent<OverlaySlots>()({

const menuRef = ref<VMenu>()

const location = computed(() => {
const [y, x = 'center'] = props.location.split(' ')
const location = computed<Anchor>(() => {
const [y, x = 'center'] = props.location?.split(' ') ?? []

return `${y} ${x}`
}) as ComputedRef<Anchor>
return `${y} ${x}` as Anchor
})

const locationClasses = computed(() => ({
[`v-speed-dial__content--${location.value.replace(' ', '-')}`]: true,
Expand Down

0 comments on commit 4077948

Please sign in to comment.