From 5675bad810598327624b5ef4523f49f3bd81b605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Poussard?= <tpoussard@neogeo.fr> Date: Thu, 27 Jan 2022 16:40:19 +0100 Subject: [PATCH] fix feature import from geojson not working --- src/store/modules/feature_type.store.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store/modules/feature_type.store.js b/src/store/modules/feature_type.store.js index f8ac20f8..524b9dc1 100644 --- a/src/store/modules/feature_type.store.js +++ b/src/store/modules/feature_type.store.js @@ -165,7 +165,7 @@ const feature_type = { }); }, - async SEND_FEATURES_FROM_GEOJSON({ state, dispatch, rootGetters }, payload) { + async SEND_FEATURES_FROM_GEOJSON({ state, dispatch, rootState }, payload) { let { feature_type_slug, geojson } = payload; //* check if geojson then build a file if(!geojson && !state.fileToImport && state.fileToImport.size === 0 ) return; @@ -173,7 +173,7 @@ const feature_type = { let fileToImport; const { name, type } = geojson || state.fileToImport; - if (!rootGetters['projects/project'].moderation) { + if (rootState.projects.project.moderation) { if (state.fileToImport && state.fileToImport.size > 0) { //* if data in a binary file, read it as text const textFile = await state.fileToImport.text(); geojson = JSON.parse(textFile); -- GitLab