Skip to content

Make errorBag parameter optional #2445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2025

Conversation

joelstein
Copy link
Contributor

Before today, I could write the following code:

router.replace({
  url: `/some-url`,
  preserveScroll: true,
  preserveState: true,
})

However, with the latest release, now I receive a Typescript error:

Argument of type '{ url: string; preserveScroll: true; preserveState: true; }' is not assignable to parameter of type 'ClientSideVisitOptions'. │
│ Property 'errorBag' is missing in type '{ url: string; preserveScroll: true; preserveState: true; }' but required in type 'ClientSideVisitOptions'.

This pull request makes the errorBag property optional.

@pascalbaljet
Copy link
Member

Thanks!

@pascalbaljet pascalbaljet merged commit 3b356d3 into inertiajs:master Jul 17, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants