This PR aims at resolving #1455 - too much recursion error.
The error is caused by getRoute being overridden multiple times: every time setupRouter is called, we create a new layer of recursion. This happens e.g. when we render a link, which calls urlFor, which calls setupRouter. So while the user clicks around the app, getRoute is overridden again and again, which can lead to too much recursion error at some point.
The proposed resolution is to leverage isSetup to make sure the getRoute is extended only once.
This PR aims at resolving #1455 -
too much recursion
error.The error is caused by
getRoute
being overridden multiple times: every timesetupRouter
is called, we create a new layer of recursion. This happens e.g. when we render a link, which callsurlFor
, which callssetupRouter
. So while the user clicks around the app,getRoute
is overridden again and again, which can lead totoo much recursion
error at some point.The proposed resolution is to leverage
isSetup
to make sure thegetRoute
is extended only once.