Skip to content
This repository has been archived by the owner on Jun 24, 2020. It is now read-only.

Commit

Permalink
use "includes" instead of equal (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Ivantsov authored Oct 6, 2017
1 parent 7625a29 commit 6e97fec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/background/modules/cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ const handleCookieChange = debounce(({
}

// user changed the account
if (prevLogin !== nextLogin) {
// prevLogin is the whole email address e.g. "[email protected]"
// however nextLogin is only login name e.g. "user"
if (prevLogin.includes(nextLogin)) {
console.log('ACCOUNT CHANGED', prevLogin, nextLogin, removed);
store.dispatch(logout());
store.dispatch(login());
Expand Down

0 comments on commit 6e97fec

Please sign in to comment.