Code split the client, update dependencies

This commit is contained in:
Ken-Håvard Lieng 2018-11-04 07:22:46 +01:00
parent 84c3d5cc88
commit d930365eeb
37 changed files with 2036 additions and 1181 deletions

View file

@ -19,7 +19,7 @@ export const getCurrentInputHistoryEntry = state => {
export default createReducer(initialState, {
[actions.INPUT_HISTORY_ADD](state, { line }) {
if (line.trim() && line !== state.history[0]) {
if (history.length === HISTORY_MAX_LENGTH) {
if (state.history.length === HISTORY_MAX_LENGTH) {
state.history.pop();
}
state.history.unshift(line);