From bd3d913484826347d7a1d7f8ea95878de793ec12 Mon Sep 17 00:00:00 2001 From: rob Date: Sun, 11 Jun 2023 07:03:16 -0400 Subject: [PATCH] resourceId management --- app/views/comment/components/comment-review.pug | 1 - app/views/comment/components/comment.pug | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/views/comment/components/comment-review.pug b/app/views/comment/components/comment-review.pug index e16b548..de6adbc 100644 --- a/app/views/comment/components/comment-review.pug +++ b/app/views/comment/components/comment-review.pug @@ -1,5 +1,4 @@ mixin renderCommentReview (comment) - - var resourceId = comment.resource._id || comment.resource; article.uk-comment.dtp-site-comment header.uk-comment-header div(uk-grid).uk-grid-medium.uk-flex-middle diff --git a/app/views/comment/components/comment.pug b/app/views/comment/components/comment.pug index 5e387d5..555dff4 100644 --- a/app/views/comment/components/comment.pug +++ b/app/views/comment/components/comment.pug @@ -1,7 +1,7 @@ include composer mixin renderComment (comment, options) - - var resourceId = comment.resource._id || comment.resource; + - var resourceId = comment.resource ? (comment.resource._id || comment.resource) : undefined; article(data-comment-id= comment._id).uk-comment.dtp-site-comment header.uk-comment-header div(uk-grid).uk-grid-medium.uk-flex-middle