mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-19 11:21:41 +03:00
Fixed adding same user name for other account issue
This commit is contained in:
parent
e69d5a74ae
commit
c0a5462a56
@ -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