Fix crashing MediaItem

This commit is contained in:
Alex Gleason
2021-09-29 21:12:59 -05:00
parent 9ddc54a666
commit 9e6a95a367

View File

@ -119,7 +119,7 @@ class MediaItem extends ImmutablePureComponent {
</div>
);
} else if (attachment.get('type') === 'audio') {
const remoteURL = attachment.get('remote_url');
const remoteURL = attachment.get('remote_url') || '';
const fileExtensionLastIndex = remoteURL.lastIndexOf('.');
const fileExtension = remoteURL.substr(fileExtensionLastIndex + 1).toUpperCase();
thumbnail = (