Browse Source

Fix mutating objects

closed-social-v3
Eugen Rochko 8 years ago
parent
commit
d5da55c6cc
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      app/assets/javascripts/components/actions/compose.jsx

+ 3
- 3
app/assets/javascripts/components/actions/compose.jsx View File

@ -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));
});

Loading…
Cancel
Save