vj4/ui/components/messagepad/reducers/inputs.js
Function reducer
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function reducer(state = {}, action) {
switch (action.type) {
case 'DIALOGUES_LOAD_DIALOGUES_FULFILLED': {
const dialogues = action.payload.messages;
return _.fromPairs(_.map(dialogues, d => [d._id, '']));
Avoid too many return
statements within this function. Open
Open
return {
...state,
[id]: '',
};
Avoid too many return
statements within this function. Open
Open
return {
..._.omit(state, placeholderId),
[action.payload.mdoc._id]: '',
};
Avoid too many return
statements within this function. Open
Open
return state;