FIX: bug with sharing when used outside a topic

Followup to ac76bfb, fixes share buttons in topic lists (only used in themes or plugins)
This commit is contained in:
Penar Musaraj 2020-08-03 16:27:11 -04:00
parent 2682da81ad
commit 52b864facf
No known key found for this signature in database
GPG Key ID: E390435D881FF0F7
2 changed files with 4 additions and 4 deletions

View File

@ -17,8 +17,8 @@ export default Component.extend({
sources(topic) {
const privateContext =
this.siteSettings.login_required ||
topic.isPrivateMessage ||
topic.invisible ||
(topic && topic.isPrivateMessage) ||
(topic && topic.invisible) ||
this.privateCategory;
return Sharing.activeSources(this.siteSettings.share_links, privateContext);
},

View File

@ -20,8 +20,8 @@ export default Component.extend({
sources(topic) {
const privateContext =
this.siteSettings.login_required ||
topic.isPrivateMessage ||
topic.invisible ||
(topic && topic.isPrivateMessage) ||
(topic && topic.invisible) ||
this.privateCategory;
return Sharing.activeSources(this.siteSettings.share_links, privateContext);