Skip to content
This repository has been archived by the owner on Oct 27, 2021. It is now read-only.

Property route undefined on replacement of route #27

Closed
georgberecz opened this issue Jul 3, 2017 · 8 comments
Closed

Property route undefined on replacement of route #27

georgberecz opened this issue Jul 3, 2017 · 8 comments
Assignees
Labels

Comments

@georgberecz
Copy link

Hey Leo,
thanks for looking into #23 and updating the Renderer. The rendering of multiple cards is not a problem anymore. However, there is now an error inside the NavBar:
image
image

I'm using the newest release candidate:
"react-router-navigation": "^1.0.0-rc.2",

I looked into the code and I think I've found something. In the DefaultRenderer replacing
return [ ...acc.slice(0,indexOf), scene ]
with
return [...acc]
and therefore, using the last occurrence in case of finding a duplicate index fixed it for me. With the old code the newly replaced route was simply sliced of again and replaced by the old one. However, the scene in the ownProps was still the new one, but could not be found in the newly generated scenes, which resulted in the exception.

Thanks for looking into that and keep up the good work,
Georg

@georgberecz georgberecz changed the title Route undefined on replacement of route Property route undefined on replacement of route Jul 3, 2017
@LeoLeBras LeoLeBras added this to the 1.0.0-rc milestone Jul 5, 2017
@LeoLeBras LeoLeBras self-assigned this Jul 5, 2017
@LeoLeBras
Copy link
Member

Hello @georgberecz ,
I can't reproduce your issue. You should consider creating a minimal test case to demonstrate the issue you're having 😀

@vlad-zhukov
Copy link
Contributor

Wasn't it fixed by #25?

@LeoLeBras
Copy link
Member

@georgberecz ?

@CharlesMangwa
Copy link
Contributor

Hi @georgberecz! Did you give a shot to the new ß3? Feel free to keep us update about your issue :)

@LeoLeBras
Copy link
Member

Closing due to inactivity

@krishnaff
Copy link

Thanks @georgberecz

This actually worked
return [ ...acc.slice(0,indexOf), scene ]
with
return [...acc]

I was getting the same error when using history.replace("...") the second time. It works the first time though.

@LeoLeBras LeoLeBras reopened this Feb 3, 2018
@LeoLeBras LeoLeBras modified the milestones: v1.0.0-rc, v1.0.0-stable Feb 3, 2018
@LeoLeBras LeoLeBras mentioned this issue Feb 3, 2018
18 tasks
@LeoLeBras
Copy link
Member

@insaneinc01 Do you have an example (or a Github) repo that reproduces the issue?

@LeoLeBras LeoLeBras removed this from the v1.0.0-stable milestone Mar 10, 2018
@LeoLeBras
Copy link
Member

This should be fixed in 1.0.0-rc.5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants