A platform for community discussion. Free, open, simple.
FIX: formats topic report only if we have one (#6231)
Joffrey JAFFEUX1ca999fdb585
diff --git a/app/assets/javascripts/admin/models/report.js.es6 b/app/assets/javascripts/admin/models/report.js.es6index c071589c19b..fc4fb8e86af 100644--- a/app/assets/javascripts/admin/models/report.js.es6+++ b/app/assets/javascripts/admin/models/report.js.es6@@ -324,12 +324,16 @@ const Report = Discourse.Model.extend({_topicLabel(properties, row) {const topicTitle = row[properties.title];- const topicId = row[properties.id];- const href = `/t/-/${topicId}`;++ const formatedValue = () => {+ const topicId = row[properties.id];+ const href = `/t/-/${topicId}`;+ return `<a href='${href}'>${topicTitle}</a>`;+ };return {value: topicTitle,- formatedValue: `<a href='${href}'>${topicTitle}</a>`+ formatedValue: topicTitle ? formatedValue() : "-"};},