fix artifact not updating with versioning
[sdc/sdc-workflow-designer.git] / workflow-designer-ui / src / main / frontend / src / features / version / versionReducer.js
index c7fccd2..d05af2d 100644 (file)
 import {
     SET_CURRENT_VERSION,
     DETAILS_CHANGED,
-    VERSION_STATE_CHANGED
+    VERSION_STATE_CHANGED,
+    TOGGLE_COMPOSITION_UPDATE
 } from 'features/version/versionConstants';
-const initialState = {};
+
+const initialState = {
+    isCompositionUpdating: false
+};
 
 function versionReducer(state = initialState, action) {
     switch (action.type) {
@@ -34,6 +38,11 @@ function versionReducer(state = initialState, action) {
                 ...state,
                 ...action.payload
             };
+        case TOGGLE_COMPOSITION_UPDATE:
+            return {
+                ...state,
+                isCompositionUpdating: action.payload.isCompositionUpdating
+            };
         default:
             return state;
     }