about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2018-03-28 16:38:53 -0500
committerGitHub <noreply@github.com>2018-03-28 16:38:53 -0500
commitd37a79adcecd04106d21d2672db68c2a9dac1517 (patch)
tree4ae6f33d8fc28137fd8f7f08ff33cdf6fc50b300 /app/javascript/flavours/glitch
parent1ed9500b524fd11910aa6beb1141c164bddcb968 (diff)
parent7db431eac6c9e7b5f480fa96d1e37971e5418b33 (diff)
Merge pull request #403 from ThibG/glitch-soc/fixes/attachment-lists-fixup
Fix attachment lists
Diffstat (limited to 'app/javascript/flavours/glitch')
-rw-r--r--app/javascript/flavours/glitch/components/attachment_list.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/app/javascript/flavours/glitch/components/attachment_list.js b/app/javascript/flavours/glitch/components/attachment_list.js
index b31d40b04..8e5bb0e0b 100644
--- a/app/javascript/flavours/glitch/components/attachment_list.js
+++ b/app/javascript/flavours/glitch/components/attachment_list.js
@@ -40,12 +40,14 @@ export default class AttachmentList extends ImmutablePureComponent {
         </div>
 
         <ul className='attachment-list__list'>
-          const displayUrl = attachment.get('remote_url') || attachment.get('url');
-
           {media.map(attachment => {
-            return (<li key={attachment.get('id')}>
-              <a href={displayUrl} target='_blank' rel='noopener'>{filename(displayUrl)}</a>
-            </li>)
+            const displayUrl = attachment.get('remote_url') || attachment.get('url');
+
+            return (
+              <li key={attachment.get('id')}>
+                <a href={displayUrl} target='_blank' rel='noopener'>{filename(displayUrl)}</a>
+              </li>
+            );
           })}
         </ul>
       </div>