inertiajs / inertia

Inertia.js lets you quickly build modern single-page React, Vue and Svelte apps using classic server-side routing and controllers.
https://inertiajs.com
MIT License
6.02k stars 405 forks source link

[1.1.0] Partial reloads - Object props updated incorrectly #1885

Closed Megarsh closed 3 weeks ago

Megarsh commented 1 month ago

Version:

Describe the problem:

On partial reloads Object props are updated incorrectly.

Example

if we have a data prop with value

{
  "b": 2,
  "a": 1,
  "c": 3,
  "d": 4
}

And on the partial reload we get a new value of

{
  "b": 40
}

The missing keys are being kept and the new value is returned as

{
  "b": 40,
  "a": 1,
  "c": 3,
  "d": 4
}

Steps to reproduce:

Minimal reproduction - https://github.com/Megarsh/inertia-issue

reinink commented 3 weeks ago

Hey thanks for reporting, this should be fixed now in v1.2.0 👍