JaspervanRiet / duck_router

A Flutter router with intents
MIT License
4 stars 3 forks source link

fix: router errors when restoring state #41

Closed JaspervanRiet closed 3 days ago

JaspervanRiet commented 3 days ago

Description

This PR fixes an issue where restoring the state, as documented by the example in #40 and in the new test, would cause an error. This was because the top location in the stack was getting duplicated when restoring. For example, you would have /home. When restoring the router, this would become /home/home with the exact same objects, and thus a crash would follow.

Related Issues

Fixes #40

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?