diff --git a/app/assets/javascripts/notes/components/issue_note_body.vue b/app/assets/javascripts/notes/components/issue_note_body.vue index d73717c6767dce64fb8190aa3cc17d088d080a80..7d4333e4d270d57b743e26aa903f25913471eff9 100644 --- a/app/assets/javascripts/notes/components/issue_note_body.vue +++ b/app/assets/javascripts/notes/components/issue_note_body.vue @@ -112,7 +112,7 @@ :toggle-award-path="note.toggle_award_path" /> <issue-note-attachment - v-if="note.attachment.url" + v-if="note.attachment" :attachment="note.attachment" /> </div> diff --git a/app/serializers/note_entity.rb b/app/serializers/note_entity.rb index e5295f5f34d0f17dff7c5ec5bb9e6d68b32594f5..416730470dc7483f8673a77079e7b96184a89f9b 100644 --- a/app/serializers/note_entity.rb +++ b/app/serializers/note_entity.rb @@ -53,7 +53,7 @@ class NoteEntity < API::Entities::Note end end - expose :attachment, using: NoteAttachmentEntity + expose :attachment, using: NoteAttachmentEntity, if: -> (note, _) { note.attachment? } expose :delete_attachment_path, if: -> (note, _) { note.attachment? } do |note| delete_attachment_project_note_path(note.project, note) end