From d027207f88f0eb3d4e971003897048b77ca0d4af Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 8 Nov 2018 13:43:45 -0500 Subject: [PATCH] fix: flags detail page crash if reporter blocks author Fixed an issue where the flags detail page would crash if the reporting user flagged a post and then proceeded to block the post author. Retrieval of a flag's target data should be irrespective of block status. fixes #6925 --- src/flags.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flags.js b/src/flags.js index fa44cc8598..34ddb51abe 100644 --- a/src/flags.js +++ b/src/flags.js @@ -90,7 +90,7 @@ Flags.get = function (flagId, callback) { // Second stage async.parallel({ userObj: async.apply(user.getUserFields, data.base.uid, ['username', 'userslug', 'picture', 'reputation']), - targetObj: async.apply(Flags.getTarget, data.base.type, data.base.targetId, data.base.uid), + targetObj: async.apply(Flags.getTarget, data.base.type, data.base.targetId, 0), }, function (err, payload) { // Final object return construction next(err, Object.assign(data.base, {