From 96af9d00403b35c27e704deaacf829a73654f149 Mon Sep 17 00:00:00 2001 From: DD Liu <liudi@media.mit.edu> Date: Wed, 10 May 2017 15:44:44 -0400 Subject: [PATCH] fix lint and reduce throttle --- src/reducers/monitors.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/reducers/monitors.js b/src/reducers/monitors.js index cf1d8e177..190735cfc 100644 --- a/src/reducers/monitors.js +++ b/src/reducers/monitors.js @@ -12,7 +12,7 @@ const reducer = function (state, action) { newState = [...state]; for (let i = 0, updated = false; i < action.monitors.length; i++) { for (let j = 0; j < state.length; j++) { - if (action.monitors[i].id == state[j].id) { + if (action.monitors[i].id === state[j].id) { newState[j] = action.monitors[i]; updated = true; continue; @@ -30,7 +30,7 @@ const reducer = function (state, action) { for (let i = 0; i < action.monitors.length; i++) { // Move backwards to keep indices aligned for (let j = state.length - 1; j >= 0; j--) { - if (action.monitors[i].id == state[j].id) { + if (action.monitors[i].id === state[j].id) { newState.splice(j, 1); continue; } @@ -47,7 +47,7 @@ reducer.updateMonitors = function (monitors) { type: UPDATE_MONITORS, monitors: monitors, meta: { - throttle: 100 + throttle: 30 } }; }; -- GitLab