mirror of
https://github.com/discourse/discourse-adplugin.git
synced 2025-02-17 17:04:51 +00:00
Fix compatibility with other js tests
This commit is contained in:
parent
171656304b
commit
26d42e9ed7
@ -47,8 +47,13 @@ export default Ember.Component.extend({
|
||||
@computed("placement")
|
||||
adComponents(placement) {
|
||||
// Check house ads first
|
||||
const houseAds = this.site.get("house_creatives"),
|
||||
adsForSlot = houseAds.settings[placement.replace(/-/g, "_")];
|
||||
const houseAds = this.site.get("house_creatives");
|
||||
if (!houseAds || !houseAds.settings) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const adsForSlot = houseAds.settings[placement.replace(/-/g, "_")];
|
||||
|
||||
if (
|
||||
Object.keys(houseAds.creatives).length > 0 &&
|
||||
!Ember.isBlank(adsForSlot)
|
||||
|
@ -56,8 +56,13 @@ export default AdComponent.extend({
|
||||
},
|
||||
|
||||
adsNamesForSlot(placement) {
|
||||
const houseAds = this.site.get("house_creatives"),
|
||||
adsForSlot = houseAds.settings[placement];
|
||||
const houseAds = this.site.get("house_creatives");
|
||||
|
||||
if (!houseAds || !houseAds.settings) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const adsForSlot = houseAds.settings[placement];
|
||||
|
||||
if (
|
||||
Object.keys(houseAds.creatives).length > 0 &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user