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")
|
@computed("placement")
|
||||||
adComponents(placement) {
|
adComponents(placement) {
|
||||||
// Check house ads first
|
// Check house ads first
|
||||||
const houseAds = this.site.get("house_creatives"),
|
const houseAds = this.site.get("house_creatives");
|
||||||
adsForSlot = houseAds.settings[placement.replace(/-/g, "_")];
|
if (!houseAds || !houseAds.settings) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
const adsForSlot = houseAds.settings[placement.replace(/-/g, "_")];
|
||||||
|
|
||||||
if (
|
if (
|
||||||
Object.keys(houseAds.creatives).length > 0 &&
|
Object.keys(houseAds.creatives).length > 0 &&
|
||||||
!Ember.isBlank(adsForSlot)
|
!Ember.isBlank(adsForSlot)
|
||||||
|
|
|
@ -56,8 +56,13 @@ export default AdComponent.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
adsNamesForSlot(placement) {
|
adsNamesForSlot(placement) {
|
||||||
const houseAds = this.site.get("house_creatives"),
|
const houseAds = this.site.get("house_creatives");
|
||||||
adsForSlot = houseAds.settings[placement];
|
|
||||||
|
if (!houseAds || !houseAds.settings) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
const adsForSlot = houseAds.settings[placement];
|
||||||
|
|
||||||
if (
|
if (
|
||||||
Object.keys(houseAds.creatives).length > 0 &&
|
Object.keys(houseAds.creatives).length > 0 &&
|
||||||
|
|
Loading…
Reference in New Issue