Fix regression in “Edit media” modal in web UI (#13243)

master
ThibG 5 years ago committed by GitHub
parent 2c6099125d
commit 90f3a00062
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/javascript/mastodon/actions/compose.js

@ -245,7 +245,7 @@ export function uploadCompose(files) {
const poll = () => { const poll = () => {
api(getState).get(`/api/v1/media/${data.id}`).then(response => { api(getState).get(`/api/v1/media/${data.id}`).then(response => {
if (response.status === 200) { if (response.status === 200) {
dispatch(uploadComposeSuccess(data, f)); dispatch(uploadComposeSuccess(response.data, f));
} else if (response.status === 206) { } else if (response.status === 206) {
setTimeout(() => poll(), 1000); setTimeout(() => poll(), 1000);
} }

Loading…
Cancel
Save