about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-12-04 18:32:31 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-12-04 18:32:31 +0100
commitd5da55c6cc100ee36391474762a34955075824ee (patch)
treeefa62922d9bb033e56aa18cefb3d494b42a60c46
parentd4559402e4786bd582264ea3d0a3ddaf6d3e9b1c (diff)
Fix mutating objects
-rw-r--r--app/assets/javascripts/components/actions/compose.jsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/components/actions/compose.jsx b/app/assets/javascripts/components/actions/compose.jsx
index 76402747d..a39ee7e19 100644
--- a/app/assets/javascripts/components/actions/compose.jsx
+++ b/app/assets/javascripts/components/actions/compose.jsx
@@ -69,9 +69,9 @@ export function submitCompose() {
       sensitive: getState().getIn(['compose', 'sensitive']),
       unlisted: getState().getIn(['compose', 'unlisted'])
     }).then(function (response) {
-      dispatch(submitComposeSuccess(response.data));
-      dispatch(updateTimeline('home', response.data));
-      dispatch(updateTimeline('public', response.data));
+      dispatch(submitComposeSuccess({ ...response.data }));
+      dispatch(updateTimeline('home', { ...response.data }));
+      dispatch(updateTimeline('public', { ...response.data }));
     }).catch(function (error) {
       dispatch(submitComposeFail(error));
     });