Skip to content

Commit

Permalink
[tmp] fixme! comment out assigns to route.state that breaks web
Browse files Browse the repository at this point in the history
TypeError: Cannot add property state, object is not extensible
  • Loading branch information
zetavg committed Dec 20, 2024
1 parent 561f7f8 commit 1bda565
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions packages/one/src/fork/getPathFromState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ function walkConfigItems(
) {
// NOTE: Fill in current route using state that was passed as params.
if (!route.state && isInvalidParams(route.params)) {
route.state = createFakeState(route.params)
console.log('why')
// route.state = createFakeState(route.params)
}

let pattern: string | null = null
Expand Down Expand Up @@ -264,7 +265,8 @@ function walkConfigItems(
}

if (!route.state && isInvalidParams(route.params)) {
route.state = createFakeState(route.params)
console.log('why')
// route.state = createFakeState(route.params)
}

// If there is no `screens` property or no nested state, we return pattern
Expand Down Expand Up @@ -327,7 +329,10 @@ function walkConfigItems(
routeName: route.name,
})
}
Object.assign(focusedParams, collectedParams)
focusedParams = {
...focusedParams,
...collectedParams,
}
}

return {
Expand Down Expand Up @@ -362,7 +367,8 @@ function getPathFromResolvedState(
// NOTE: Fill in current route using state that was passed as params.
// if (isInvalidParams(route.params)) {
if (!route.state && isInvalidParams(route.params)) {
route.state = createFakeState(route.params)
console.log('why')
// route.state = createFakeState(route.params)
}

const {
Expand Down

0 comments on commit 1bda565

Please sign in to comment.