mirror of
https://github.com/ecency/ecency-mobile.git
synced 2025-01-03 03:25:24 +03:00
Fixed adding same user name for other account issue
This commit is contained in:
parent
8543fe5d95
commit
b15add64fe
@ -45,7 +45,9 @@ export default function(state = initialState, action) {
|
|||||||
case ADD_OTHER_ACCOUNT:
|
case ADD_OTHER_ACCOUNT:
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
otherAccounts: [...state.otherAccounts, action.payload],
|
otherAccounts: state.otherAccounts.some(item => item.username === action.payload.username)
|
||||||
|
? [...state.otherAccounts]
|
||||||
|
: [...state.otherAccounts, action.payload],
|
||||||
isFetching: false,
|
isFetching: false,
|
||||||
hasError: false,
|
hasError: false,
|
||||||
errorMessage: null,
|
errorMessage: null,
|
||||||
|
Loading…
Reference in New Issue
Block a user