Closed PEM-- closed 8 years ago
While investigating, onpopstate
is triggered before the router is initialized on Safari (OSX & iOS).
EDIT: As the router isn't initialized yet, self.go
shouldn't be called despite its idempotency as it doesn't exist yet.
Fixed with #538
Thanks.
Merged & Published as v3.11.1
.
Thanks :+1:
I use
FlowRouter.wait();
at the early beginning of my app to block routing on the client. When the router is blocked, I wait for the subscriptions to settle and create routes dynamically using some collections. When every routes are created, I release the router with aFlowRouter.initialize();
for creating routes.This pattern works fine on Chrome (OSX & Android), Firefox. It fails on Safari (OSX & iOS).
The 'not-found' route is started despite its declaration has been postponed long after the init.