-
Notifications
You must be signed in to change notification settings - Fork 80
Description
Hello,
In my own fork of this project, I've gone ahead to remove all references to fatalError()
in my use of the Router. This warranted a change to the router itself, to prevent any operations from occurring if I ever return nil
from the pushRouteSegment
or changeRouteSegment
functions. I have manually popped the route from the stack if we ever hit newState()
with an invalid route.
Is this the correct way to do this? I would like some further clarification too on why fatalError()
was chosen as opposed to assertionFailure()
which would be evaluated in DEBUG builds only. The situation we faced was the occasional (widespread) crash in the Routables in our release builds which was horrendously detrimental to our user experience.
I am happy to make a pull request for this too. Otherwise a discussion would be great! 🙌