Skip to content
This repository has been archived by the owner on Apr 1, 2019. It is now read-only.

Fix BUG performLogin called multiple times #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

orther
Copy link

@orther orther commented Dec 4, 2017

Fix /issues/35

Since enable caused the policy function to be called for every action dispatched to the store, any action(s) dispatched between state.cognito.state transitions could caused duplicate calls of the policy function.

To fix this the store subscription handler checks if state.cognito.state has changed and only calls the policy function if it has.

Since `enable` caused the policy function to be called for every action dispatched to the store, any action(s) dispatched after performLogin was called and before `state.cognito.state` transitioned from `LOGGING_IN` to something else caused `performLogin` to be called.

To fix this bug the store subscription handler checks if `state.cognito.state` has changed and only calls the policy function if it has.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG - performLogin called multiple times
1 participant