Skip to content
This repository was archived by the owner on Sep 20, 2020. It is now read-only.

Commit e411678

Browse files
fix($futureState) Fixed double resolve on initial app load. Closes #28 Closes #32
1 parent 0d595cf commit e411678

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/futureState.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,13 @@
184184
// TODO: analyze this. I'm calling $urlRouter.sync() in two places for retry-initial-transition.
185185
// TODO: I should only need to do this once. Pick the better place and remove the extra resync.
186186
initPromise().then(function retryInitialState() {
187-
$timeout(function() { $urlRouter.sync(); } );
187+
$timeout(function() {
188+
if ($state.transition) {
189+
$state.transition.then($urlRouter.sync, $urlRouter.sync);
190+
} else {
191+
$urlRouter.sync();
192+
}
193+
});
188194
});
189195
}
190196
init();

0 commit comments

Comments
 (0)