Skip to content

Commit

Permalink
Merge pull request #2070 from meteorplus/patch-14
Browse files Browse the repository at this point in the history
fix bug preflight from apollo
  • Loading branch information
SachaG authored Sep 16, 2018
2 parents fdcdea9 + 192ced4 commit f41bf74
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,21 @@ export class AccountsLoginFormInner extends TrackerComponent {

const resetStoreAndThen = hook => {
return () => {
props.client.resetStore();
hook();
props.client.resetStore().then(() => {
hook();
})
}
}

const postLogInAndThen = hook => {
return () => {
props.client.resetStore();

if(Callbacks['users.postlogin']) { // execute any post-sign-in callbacks
props.client.resetStore().then(() => {
if(Callbacks['users.postlogin']) { // execute any post-sign-in callbacks
runCallbacks('users.postlogin');
} else { // or else execute the hook
hook();
}
} else { // or else execute the hook
hook();
}
})
}
}

Expand Down

0 comments on commit f41bf74

Please sign in to comment.