Skip to content

Commit

Permalink
Revert "deep merge properties (#1877)" (#1895)
Browse files Browse the repository at this point in the history
* Revert "deep merge properties (#1877)"

This reverts commit 7179279.

* Update changelog
  • Loading branch information
reinink authored Jun 13, 2024
1 parent 519272b commit 83ffcda
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ For changes prior to v1.0.0, see the [legacy releases](https://legacy.inertiajs.
## [Unreleased](https://github.com/inertiajs/inertia/compare/v1.1.0...HEAD)

- Fix `preserveScroll` and `preserveState` types ([#1882](https://github.com/inertiajs/inertia/pull/1882))
- Add Svelte TypeScript support ([#1866](https://github.com/inertiajs/inertia/pull/1866))
- Revert "merge props from partial reloads" ([#1895](https://github.com/inertiajs/inertia/pull/1895))

## [v1.1.0](https://github.com/inertiajs/inertia/compare/v1.0.16...v1.1.0)

Expand Down
5 changes: 1 addition & 4 deletions packages/core/src/router.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { default as Axios, AxiosResponse } from 'axios'
import deepmerge from 'deepmerge'
import debounce from './debounce'
import {
fireBeforeEvent,
Expand Down Expand Up @@ -388,9 +387,7 @@ export class Router {

const pageResponse: Page = response.data
if (isPartial && pageResponse.component === this.page.component) {
pageResponse.props = deepmerge(this.page.props, pageResponse.props, {
arrayMerge: (_target: any[], source: any[]) => source,
})
pageResponse.props = { ...this.page.props, ...pageResponse.props }
}
preserveScroll = this.resolvePreserveOption(preserveScroll, pageResponse) as boolean
preserveState = this.resolvePreserveOption(preserveState, pageResponse)
Expand Down

0 comments on commit 83ffcda

Please sign in to comment.