about summary refs log tree commit diff
path: root/app/javascript/mastodon/actions/statuses.js
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-03-06 11:29:06 +0100
committerThibaut Girka <thib@sitedethib.com>2019-03-06 11:29:06 +0100
commit48062329973398fe5b12cadcc389c8602f1bb17f (patch)
treee2bfa37e2985b90f2de03d7a47c4ffbd76ed8949 /app/javascript/mastodon/actions/statuses.js
parente80fabfd84c1e2d157ca1cd536f68f3c75f011c1 (diff)
parentad6f7ea25036e7065a1a04d020e2f51023e2e614 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/javascript/mastodon/actions/statuses.js')
-rw-r--r--app/javascript/mastodon/actions/statuses.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/javascript/mastodon/actions/statuses.js b/app/javascript/mastodon/actions/statuses.js
index e7c89b4ba..1794538e2 100644
--- a/app/javascript/mastodon/actions/statuses.js
+++ b/app/javascript/mastodon/actions/statuses.js
@@ -140,7 +140,11 @@ export function redraft(status) {
 
 export function deleteStatus(id, router, withRedraft = false) {
   return (dispatch, getState) => {
-    const status = getState().getIn(['statuses', id]);
+    let status = getState().getIn(['statuses', id]);
+
+    if (status.get('poll')) {
+      status = status.set('poll', getState().getIn(['polls', status.get('poll')]));
+    }
 
     dispatch(deleteStatusRequest(id));