diff --git a/src/app/components/adbutler/adbutler.component.ts b/src/app/components/adbutler/adbutler.component.ts index acee2902..8abd3183 100644 --- a/src/app/components/adbutler/adbutler.component.ts +++ b/src/app/components/adbutler/adbutler.component.ts @@ -23,7 +23,7 @@ export class AdbutlerComponent implements OnInit { this.httpClient .get('https://servedbyadbutler.com/adserve/;ID=165803;size=0x0;setID=371476;type=json;').subscribe( response => { - if (response['placements']) { + if (response && response['placements']) { this.onLoad.emit(true); this.htmlCode = response['placements'].placement_1.body; this.ad.nativeElement.insertAdjacentHTML('beforeend', this.htmlCode);