Ensured tags list keeps sorted after editing a tag

This commit is contained in:
Alejandro Celaya 2018-08-19 20:11:43 +02:00
parent 5d2de11615
commit 03870c0c6f

View file

@ -43,7 +43,7 @@ export default function reducer(state = defaultState, action) {
...state, ...state,
tags: state.tags.map( tags: state.tags.map(
tag => tag === action.oldName ? action.newName : tag tag => tag === action.oldName ? action.newName : tag
), ).sort(),
}; };
default: default:
return state; return state;