mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 04:41:43 +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:
|
||||
return {
|
||||
...state,
|
||||
otherAccounts: [...state.otherAccounts, action.payload],
|
||||
otherAccounts: state.otherAccounts.some(item => item.username === action.payload.username)
|
||||
? [...state.otherAccounts]
|
||||
: [...state.otherAccounts, action.payload],
|
||||
isFetching: false,
|
||||
hasError: false,
|
||||
errorMessage: null,
|
||||
|
Loading…
Reference in New Issue
Block a user