mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: 'topic' can have null value
This commit is contained in:
parent
76a14c47ac
commit
1b454c73ae
@ -560,4 +560,4 @@ DEPENDENCIES
|
|||||||
webpush
|
webpush
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
1.17.3
|
2.0.1
|
||||||
|
@ -32,8 +32,13 @@ export default Ember.Component.extend(
|
|||||||
|
|
||||||
buildBuffer(buffer) {
|
buildBuffer(buffer) {
|
||||||
const canAct = this.get("canAct");
|
const canAct = this.get("canAct");
|
||||||
|
const topic = this.get("topic");
|
||||||
|
|
||||||
TopicStatusIcons.render(this.get("topic"), function(name, key) {
|
if (!topic) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
TopicStatusIcons.render(topic, function(name, key) {
|
||||||
const actionable = ["pinned", "unpinned"].includes(key) && canAct;
|
const actionable = ["pinned", "unpinned"].includes(key) && canAct;
|
||||||
const title = escapeExpression(I18n.t(`topic_statuses.${key}.help`)),
|
const title = escapeExpression(I18n.t(`topic_statuses.${key}.help`)),
|
||||||
startTag = actionable ? "a href" : "span",
|
startTag = actionable ? "a href" : "span",
|
||||||
|
Loading…
Reference in New Issue
Block a user