diff --git a/web_src/js/index.js b/web_src/js/index.js index cab488167..8fe201192 100755 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -1214,7 +1214,7 @@ async function initRepository() { files: $attachments }, (data) => { - if (data.length === 0) { + if (data.length === 0 || data.content === '') { $renderContent.html($('#no-content').html()); } else { $renderContent.html(data.content); @@ -1225,7 +1225,7 @@ async function initRepository() { let imageShow = '' const $content = $segment.parent(); if (!$content.find('.ui.small.images').length) { - if (data.attachments !== '') { + if (data.attachments !== '' && data.attachments) { if ($content.find('.ui.middle.aligned').length === 0) { imageShow += '
' imageShow += '