changeset 3124:583b6748431f

client: don't acces module's own state through rootState
author Markus Kottlaender <markus@intevation.de>
date Mon, 29 Apr 2019 12:58:27 +0200
parents f0af359391a0
children 383720d8d98e
files client/src/store/fairway.js
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/store/fairway.js	Mon Apr 29 12:11:06 2019 +0200
+++ b/client/src/store/fairway.js	Mon Apr 29 12:58:27 2019 +0200
@@ -178,7 +178,7 @@
         });
       }
     },
-    cut({ commit, dispatch, rootState, rootGetters }, cut) {
+    cut({ commit, dispatch, state, rootState, rootGetters }, cut) {
       return new Promise(resolve => {
         const length = getLength(cut.getGeometry());
         commit(
@@ -207,9 +207,9 @@
           const profileLoaders = [
             dispatch("loadProfile", rootState.bottlenecks.selectedSurvey)
           ];
-          if (rootState.fairwayprofile.additionalSurvey) {
+          if (state.additionalSurvey) {
             profileLoaders.push(
-              dispatch("loadProfile", rootState.fairwayprofile.additionalSurvey)
+              dispatch("loadProfile", state.additionalSurvey)
             );
           }