Skip to content

Commit 156565d

Browse files
author
Adriána Kohanová
committed
#455 Store and retrieve snapshot actions in/from the backend
1 parent 4631505 commit 156565d

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

js/reducers/tracking/dispatchActions.js

+3-11
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,10 @@ import {
8282
} from '../../components/datasets/redux/actions';
8383

8484
export const saveCurrentActionsList = (snapshotID, projectID) => (dispatch, getState) => {
85-
const state = getState();
86-
87-
let actionList = state.trackingReducers.track_actions_list;
88-
89-
if (!actionList || actionList.length === 0) {
90-
Promise.resolve(dispatch(getTrackingActions(projectID))).then(response => {
91-
actionList = response;
92-
dispatch(saveActionsList(snapshotID, actionList));
93-
});
94-
} else {
85+
Promise.resolve(dispatch(getTrackingActions(projectID))).then(response => {
86+
let actionList = response;
9587
dispatch(saveActionsList(snapshotID, actionList));
96-
}
88+
});
9789
};
9890

9991
export const saveActionsList = (snapshotID, actionList) => (dispatch, getState) => {

0 commit comments

Comments
 (0)