FIX: Catch exception if ads can't be rendered
This commit is contained in:
parent
a70491c720
commit
883d5ecd85
|
@ -116,11 +116,15 @@ export default Ember.Component.extend({
|
|||
|
||||
_triggerAds() {
|
||||
const adsbygoogle = window.adsbygoogle || [];
|
||||
adsbygoogle.push({});
|
||||
|
||||
try {
|
||||
adsbygoogle.push({});
|
||||
} catch (ex) { }
|
||||
},
|
||||
|
||||
didInsertElement() {
|
||||
this._super();
|
||||
|
||||
Ember.run.scheduleOnce('afterRender', this, this._triggerAds);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue