about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/account_gallery/index.js
diff options
context:
space:
mode:
authorReverite <github@reverite.sh>2019-10-05 12:13:22 -0700
committerReverite <github@reverite.sh>2019-10-05 12:13:22 -0700
commit46ada47e09af0da9c776ef83c0ff034c720a83d6 (patch)
tree54fd4b1d5fba6d592f328955ef5968608bbe716f /app/javascript/flavours/glitch/features/account_gallery/index.js
parent333b5e25f0a615a9518d402ef10dceb70190a52f (diff)
parent3921125e5578fb3871fdcae0e8e8a77179f1ad72 (diff)
Merge branch 'glitch' into production
Diffstat (limited to 'app/javascript/flavours/glitch/features/account_gallery/index.js')
-rw-r--r--app/javascript/flavours/glitch/features/account_gallery/index.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/account_gallery/index.js b/app/javascript/flavours/glitch/features/account_gallery/index.js
index 597196567..ff39764bb 100644
--- a/app/javascript/flavours/glitch/features/account_gallery/index.js
+++ b/app/javascript/flavours/glitch/features/account_gallery/index.js
@@ -111,8 +111,10 @@ class AccountGallery extends ImmutablePureComponent {
   }
 
   handleOpenMedia = attachment => {
-    if (['video', 'audio'].includes(attachment.get('type'))) {
+    if (attachment.get('type') === 'video') {
       this.props.dispatch(openModal('VIDEO', { media: attachment, status: attachment.get('status') }));
+    } else if (attachment.get('type') === 'audio') {
+      this.props.dispatch(openModal('AUDIO', { media: attachment, status: attachment.get('status') }));
     } else {
       const media = attachment.getIn(['status', 'media_attachments']);
       const index = media.findIndex(x => x.get('id') === attachment.get('id'));