FIX: 'topic' can have null value

This commit is contained in:
Vinoth Kannan 2019-03-13 16:34:47 +05:30
parent 76a14c47ac
commit 1b454c73ae
2 changed files with 7 additions and 2 deletions

View File

@ -560,4 +560,4 @@ DEPENDENCIES
webpush
BUNDLED WITH
1.17.3
2.0.1

View File

@ -32,8 +32,13 @@ export default Ember.Component.extend(
buildBuffer(buffer) {
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 title = escapeExpression(I18n.t(`topic_statuses.${key}.help`)),
startTag = actionable ? "a href" : "span",