diff options
Diffstat (limited to 'modern')
-rw-r--r-- | modern/src/DevicesList.js | 2 | ||||
-rw-r--r-- | modern/src/store/devices.js | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/modern/src/DevicesList.js b/modern/src/DevicesList.js index f5482252..f98e5c72 100644 --- a/modern/src/DevicesList.js +++ b/modern/src/DevicesList.js @@ -135,7 +135,7 @@ const DeviceView = ({ updateTimestamp, onMenuClick }) => { const filteredItems = useSelector(getFilteredDevices); - const getItems = () => filteredItems.length == 0 ? items : filteredItems; + const getItems = () => (filteredItems.length === 0 ? items : filteredItems); if (listInnerEl.current) { listInnerEl.current.className = classes.listInner; diff --git a/modern/src/store/devices.js b/modern/src/store/devices.js index ab4ca9ee..cfe8f162 100644 --- a/modern/src/store/devices.js +++ b/modern/src/store/devices.js @@ -24,11 +24,11 @@ const { reducer, actions } = createSlice({ filterByName(state, action) { return { ...state, - filteredItems: action.payload ? - Object.values(state.items).filter((item) => item.name?.toLowerCase().includes(action.payload?.toLowerCase())) + filteredItems: action.payload + ? Object.values(state.items).filter((item) => item.name?.toLowerCase().includes(action.payload?.toLowerCase())) : state.items, - } - } + }; + }, }, }); |