mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +01:00
fix: don't crash if post is undefined
This commit is contained in:
@@ -93,7 +93,7 @@ Posts.getPostIndices = async function (posts, uid) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Posts.modifyPostByPrivilege = function (post, privileges) {
|
Posts.modifyPostByPrivilege = function (post, privileges) {
|
||||||
if (post.deleted && !(post.selfPost || privileges['posts:view_deleted'])) {
|
if (post && post.deleted && !(post.selfPost || privileges['posts:view_deleted'])) {
|
||||||
post.content = '[[topic:post_is_deleted]]';
|
post.content = '[[topic:post_is_deleted]]';
|
||||||
if (post.user) {
|
if (post.user) {
|
||||||
post.user.signature = '';
|
post.user.signature = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user