summaryrefslogtreecommitdiff
path: root/app/client/modules/morph/morph.reducer.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/client/modules/morph/morph.reducer.js')
-rw-r--r--app/client/modules/morph/morph.reducer.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/client/modules/morph/morph.reducer.js b/app/client/modules/morph/morph.reducer.js
index 92cbc9e..99e2001 100644
--- a/app/client/modules/morph/morph.reducer.js
+++ b/app/client/modules/morph/morph.reducer.js
@@ -27,6 +27,16 @@ const morphReducer = (state = morphInitialState, action) => {
...state,
app: action.app,
}
+ case types.file.create:
+ console.log(action)
+ if (action.data.module !== 'morph') return state
+ return {
+ ...state,
+ app: state.app && {
+ ...state.app,
+ files: [action.data].concat(state.app.files)
+ }
+ }
default:
return state
}