mirror of
https://github.com/discourse/discourse-adplugin.git
synced 2025-07-03 20:02:13 +00:00
FIX: Ensure we won't render the connector if there are no ads (#148)
This commit is contained in:
parent
d9b739f803
commit
4940d0ea19
@ -99,8 +99,8 @@ export function slotContenders(
|
||||
site,
|
||||
siteSettings,
|
||||
placement,
|
||||
postNumber,
|
||||
indexNumber
|
||||
indexNumber,
|
||||
postNumber
|
||||
) {
|
||||
let types = [];
|
||||
const houseAds = site.get("house_creatives"),
|
||||
@ -186,8 +186,8 @@ export default AdComponent.extend({
|
||||
this.site,
|
||||
this.siteSettings,
|
||||
placement,
|
||||
postNumber,
|
||||
indexNumber
|
||||
indexNumber,
|
||||
postNumber
|
||||
);
|
||||
},
|
||||
|
||||
|
@ -3,12 +3,13 @@ import { slotContenders } from "discourse/plugins/discourse-adplugin/discourse/c
|
||||
export default {
|
||||
shouldRender(args, component) {
|
||||
return (
|
||||
args.index &&
|
||||
slotContenders(
|
||||
component.site,
|
||||
component.siteSettings,
|
||||
"topic-list-between",
|
||||
args.index
|
||||
).length === 0
|
||||
).length > 0
|
||||
);
|
||||
},
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user