File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -441,15 +441,18 @@ export default function useForm<TForm extends FormDataType<TForm>>(
441441 watch (
442442 form as any as InertiaForm < TForm > & RememberInternalState < TForm > ,
443443 ( newValue ) => {
444- const formValue = newValue
445- formValue . isDirty = ! isEqual ( formValue . data ( ) , defaults )
444+ newValue . isDirty = ! isEqual ( newValue . data ( ) , defaults )
446445 if ( rememberKey ) {
447- router . remember ( cloneDeep ( formValue . __remember ( ) ) , rememberKey )
446+ router . remember ( cloneDeep ( newValue . __remember ( ) ) , rememberKey )
448447 }
449448 } ,
450449 { immediate : true , deep : true } ,
451450 )
452451
452+ if ( ! precognitionEndpoint ) {
453+ return form
454+ }
455+
453456 // Vue's reactive() wrapper matches our interface at runtime
454457 const typedForm = form as any as InertiaForm < TForm >
455458
You can’t perform that action at this time.
0 commit comments