From 6303bca92ed118fb14053e5c96288dfec3030873 Mon Sep 17 00:00:00 2001 From: Dana Lambert Date: Wed, 20 Oct 2021 12:38:18 +1300 Subject: [PATCH] Fix filter update method on frontend --- frontend/src/pages/MainPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/MainPage.js b/frontend/src/pages/MainPage.js index 929a0bb..98897ce 100644 --- a/frontend/src/pages/MainPage.js +++ b/frontend/src/pages/MainPage.js @@ -29,7 +29,7 @@ export default class MainPage extends React.Component { } updateFilterState(newFilter) { - this.setState({ filters: { ...this.state.filters, ...newFilter } }) + this.setState({ filters: Object.assign(this.state.filters, newFilter) }) this.updatePlants() }