From 18a53c4c77dc71321402c754c41d6c41debf2377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Thu, 6 Aug 2020 11:09:40 +0200 Subject: [PATCH] fix: only fetch types once --- .../component/feature/form/feature-type-select-component.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/component/feature/form/feature-type-select-component.jsx b/frontend/src/component/feature/form/feature-type-select-component.jsx index ae56e59164..804eff4b9a 100644 --- a/frontend/src/component/feature/form/feature-type-select-component.jsx +++ b/frontend/src/component/feature/form/feature-type-select-component.jsx @@ -4,7 +4,8 @@ import MySelect from '../../common/select'; class FeatureTypeSelectComponent extends Component { componentDidMount() { - if (this.props.fetchFeatureTypes) { + const { fetchFeatureTypes, types } = this.props; + if (types[0].inital && fetchFeatureTypes) { this.props.fetchFeatureTypes(); } }