1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Tools: Apply "curly" eslint rule

This commit is contained in:
Laurent Cozic
2020-03-13 23:57:34 +00:00
parent e2e55b6e08
commit e399474b4e
10 changed files with 47 additions and 30 deletions

View File

@ -209,8 +209,7 @@ function handleItemDelete(state, action) {
function updateOneItem(state, action, keyName = '') {
let itemsKey = null;
if (keyName) itemsKey = keyName;
else {
if (keyName) { itemsKey = keyName; } else {
if (action.type === 'TAG_UPDATE_ONE') itemsKey = 'tags';
if (action.type === 'FOLDER_UPDATE_ONE') itemsKey = 'folders';
if (action.type === 'MASTERKEY_UPDATE_ONE') itemsKey = 'masterKeys';
@ -397,10 +396,11 @@ const reducer = (state = defaultState, action) => {
case 'NOTE_SELECT_ALL_TOGGLE': {
newState = Object.assign({}, state);
const allSelected = state.notes.every(n => state.selectedNoteIds.includes(n.id));
if (allSelected)
if (allSelected) {
newState.selectedNoteIds = [];
else
} else {
newState.selectedNoteIds = newState.notes.map(n => n.id);
}
break;
}