diff --git a/app/soapbox/components/media_gallery.js b/app/soapbox/components/media_gallery.js index 7a6b77eea..a79ccbd43 100644 --- a/app/soapbox/components/media_gallery.js +++ b/app/soapbox/components/media_gallery.js @@ -197,21 +197,18 @@ class Item extends React.PureComponent { ); } else if (attachment.get('type') === 'audio') { - const remoteURL = attachment.get('remote_url'); - const originalUrl = attachment.get('url'); - const fileExtensionLastIndex = remoteURL.lastIndexOf('.'); - const fileExtension = remoteURL.substr(fileExtensionLastIndex + 1).toUpperCase(); + const ext = attachment.get('url').split('.').pop().toUpperCase(); thumbnail = ( - {fileExtension} + {ext} ); } else if (attachment.get('type') === 'video') {