mirror of
https://github.com/discourse/discourse-adplugin.git
synced 2025-02-14 23:44:44 +00:00
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…
x
Reference in New Issue
Block a user