From 4ba71c8bd5781ae06ceb31a4be47c550508e7fca Mon Sep 17 00:00:00 2001 From: pathmapper Date: Thu, 20 Jun 2019 09:52:54 +0200 Subject: [PATCH] Remove UNSAFE_componentWillUpdate --- src/components/modals/AddModal.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/modals/AddModal.jsx b/src/components/modals/AddModal.jsx index 0cdac515..abf1fb74 100644 --- a/src/components/modals/AddModal.jsx +++ b/src/components/modals/AddModal.jsx @@ -53,7 +53,7 @@ class AddModal extends React.Component { } } - UNSAFE_componentWillUpdate(nextProps, nextState) { + shouldComponentUpdate(nextProps, nextState) { // Check if source is valid for new type const oldType = this.state.type; const newType = nextState.type; @@ -75,6 +75,7 @@ class AddModal extends React.Component { source: "" }); } + return true; } getLayersForSource(source) {