Skip to content

Commit

Permalink
bugfix: not all topics have categories
Browse files Browse the repository at this point in the history
  • Loading branch information
angusmcleod committed Jun 3, 2019
1 parent 40f2f4e commit 900b14b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
const buffered = this.get('buffered');
const user = Discourse.User.current();
const showEventControls = (category) => {
return category.events_enabled && (
return category && category.events_enabled && (
user.staff ||
user.trust_level >= category.events_min_trust_to_create
);
Expand Down

0 comments on commit 900b14b

Please sign in to comment.