Node.js based forum software built for the modern web
better handle loading of flag details if getTarget returns null or undefined instead of {} for purged data
Julian Lamd5073a9a4f35
diff --git a/src/controllers/mods.js b/src/controllers/mods.jsindex a7cb252c2c..69bfd7fbbf 100644--- a/src/controllers/mods.js+++ b/src/controllers/mods.js@@ -126,7 +126,7 @@ modsController.flags.detail = function (req, res, next) {assignees: results.assignees,type_bool: ['post', 'user', 'empty'].reduce(function (memo, cur) {if (cur !== 'empty') {- memo[cur] = results.flagData.type === cur && !!Object.keys(results.flagData.target).length;+ memo[cur] = results.flagData.type === cur && (!results.flagData.target || !!Object.keys(results.flagData.target).length);} else {memo[cur] = !Object.keys(results.flagData.target).length;}