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,
|
site,
|
||||||
siteSettings,
|
siteSettings,
|
||||||
placement,
|
placement,
|
||||||
postNumber,
|
indexNumber,
|
||||||
indexNumber
|
postNumber
|
||||||
) {
|
) {
|
||||||
let types = [];
|
let types = [];
|
||||||
const houseAds = site.get("house_creatives"),
|
const houseAds = site.get("house_creatives"),
|
||||||
|
@ -186,8 +186,8 @@ export default AdComponent.extend({
|
||||||
this.site,
|
this.site,
|
||||||
this.siteSettings,
|
this.siteSettings,
|
||||||
placement,
|
placement,
|
||||||
postNumber,
|
indexNumber,
|
||||||
indexNumber
|
postNumber
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,13 @@ import { slotContenders } from "discourse/plugins/discourse-adplugin/discourse/c
|
||||||
export default {
|
export default {
|
||||||
shouldRender(args, component) {
|
shouldRender(args, component) {
|
||||||
return (
|
return (
|
||||||
|
args.index &&
|
||||||
slotContenders(
|
slotContenders(
|
||||||
component.site,
|
component.site,
|
||||||
component.siteSettings,
|
component.siteSettings,
|
||||||
"topic-list-between",
|
"topic-list-between",
|
||||||
args.index
|
args.index
|
||||||
).length === 0
|
).length > 0
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue