Skip to content

Commit 9aaeab5

Browse files
Standardise support for uppercase method (#10)
Co-authored-by: Taylor Otwell <[email protected]>
1 parent 13fe572 commit 9aaeab5

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/react-inertia/src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import { useForm as useInertiaForm } from '@inertiajs/react'
44
import { useRef } from 'react'
55

66
export const useForm = <Data extends Record<string, unknown>>(method: RequestMethod, url: string, inputs: Data, config: ValidationConfig = {}): any => {
7+
// @ts-expect-error
8+
method = method.toLowerCase()
9+
710
const booted = useRef<boolean>(false)
811

912
/**

packages/vue-inertia/src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import { useForm as usePrecognitiveForm } from 'laravel-precognition-vue'
33
import { useForm as useInertiaForm } from '@inertiajs/vue3'
44

55
export const useForm = <Data extends Record<string, unknown>>(method: RequestMethod, url: string, inputs: Data, config: ValidationConfig = {}): any => {
6+
// @ts-expect-error
7+
method = method.toLowerCase()
8+
69
/**
710
* The Inertia form.
811
*/

0 commit comments

Comments
 (0)