Browse Source

add check to make sure image has an owner before rendering the owner

develop
Rob Colbert 2 years ago
parent
commit
3811fbfb83
  1. 11
      app/views/admin/image/index.pug

11
app/views/admin/image/index.pug

@ -33,11 +33,12 @@ block content
span
i.fas.fa-trash
span.uk-margin-small-left Delete image
li
a(href=`/admin/image/${image._id}/archive-user`).uk-text-truncate
span
i.fas.fa-file-archive
span.uk-margin-small-left Archive and ban #[span.uk-text-bold= image.owner.username]
if image.owner
li
a(href=`/admin/image/${image._id}/archive-user`).uk-text-truncate
span
i.fas.fa-file-archive
span.uk-margin-small-left Archive and ban #[span.uk-text-bold= image.owner.username]
+renderPaginationBar('/admin/image', images.totalImageCount)

Loading…
Cancel
Save