From 9c379084a736c8495b67a882f5ac43bbbc55cd68 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 4 Dec 2016 18:32:31 +0100 Subject: [PATCH] Fix mutating objects --- app/assets/javascripts/components/actions/compose.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/components/actions/compose.jsx b/app/assets/javascripts/components/actions/compose.jsx index 76402747da..a39ee7e198 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)); });