Update adbutler.component.ts

This commit is contained in:
piotrpekala7 2020-05-15 00:11:50 +02:00
parent 9a2744bc64
commit 0e8f9326a3

View File

@ -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);