Skip to content

Commit

Permalink
fix elProps computer property
Browse files Browse the repository at this point in the history
  • Loading branch information
joetannenbaum committed Nov 21, 2024
1 parent 8a73c9f commit 7bc58a5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/vue3/src/link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,16 @@ const Link: InertiaLink = defineComponent({

const method = props.method.toLowerCase() as Method
const as = method !== 'get' ? 'button' : props.as.toLowerCase()
const mergeDataArray = computed(() => mergeDataIntoQueryString(method, props.href || '', props.data, props.queryStringArrayFormat))
const mergeDataArray = computed(() =>
mergeDataIntoQueryString(method, props.href || '', props.data, props.queryStringArrayFormat),
)
const href = computed(() => mergeDataArray.value[0])
const data = computed(() => mergeDataArray.value[1])

const elProps = computed(() => {
a: { href: href.value }
button: { type: 'button' }
})
const elProps = computed(() => ({
a: { href: href.value },
button: { type: 'button' },
}))

const baseParams = {
data: data.value,
Expand Down

0 comments on commit 7bc58a5

Please sign in to comment.