Unverified Commit 88a3fade authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Remove unused optimistic tree parameters (#45264)

<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

Noticed that there were some leftover parameters. Removed them as
they're no longer needed.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
parent c1737180
...@@ -8,9 +8,7 @@ import { matchSegment } from '../match-segments' ...@@ -8,9 +8,7 @@ import { matchSegment } from '../match-segments'
export function createOptimisticTree( export function createOptimisticTree(
segments: string[], segments: string[],
flightRouterState: FlightRouterState | null, flightRouterState: FlightRouterState | null,
_isFirstSegment: boolean, parentRefetch: boolean
parentRefetch: boolean,
_href?: string
): FlightRouterState { ): FlightRouterState {
const [existingSegment, existingParallelRoutes] = flightRouterState || [ const [existingSegment, existingParallelRoutes] = flightRouterState || [
null, null,
...@@ -33,7 +31,6 @@ export function createOptimisticTree( ...@@ -33,7 +31,6 @@ export function createOptimisticTree(
const childItem = createOptimisticTree( const childItem = createOptimisticTree(
segments.slice(1), segments.slice(1),
parallelRoutes ? parallelRoutes.children : null, parallelRoutes ? parallelRoutes.children : null,
false,
parentRefetch || shouldRefetchThisLevel parentRefetch || shouldRefetchThisLevel
) )
......
...@@ -391,13 +391,7 @@ function clientReducer( ...@@ -391,13 +391,7 @@ function clientReducer(
// Optimistic tree case. // Optimistic tree case.
// If the optimistic tree is deeper than the current state leave that deeper part out of the fetch // If the optimistic tree is deeper than the current state leave that deeper part out of the fetch
const optimisticTree = createOptimisticTree( const optimisticTree = createOptimisticTree(segments, state.tree, false)
segments,
state.tree,
true,
false,
href
)
// Copy subTreeData for the root node of the cache. // Copy subTreeData for the root node of the cache.
cache.status = CacheStates.READY cache.status = CacheStates.READY
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment