mirror of
https://github.com/discourse/discourse-adplugin.git
synced 2025-07-01 19:12:12 +00:00
Merge pull request #64 from featheredtoast/ember-w-function
FIX: resolve collision on ember's builtin w string function
This commit is contained in:
commit
3295a5ec26
@ -216,6 +216,8 @@ export default Ember.Component.extend({
|
|||||||
_initGoogleDFP: function() {
|
_initGoogleDFP: function() {
|
||||||
if (!this.get('showAd')) { return; }
|
if (!this.get('showAd')) { return; }
|
||||||
|
|
||||||
|
const ember_w_function = String.prototype.w;
|
||||||
|
String.prototype.w = null;
|
||||||
var self = this;
|
var self = this;
|
||||||
loadGoogle(this.siteSettings).then(function() {
|
loadGoogle(this.siteSettings).then(function() {
|
||||||
self.set('loadedGoogletag', true);
|
self.set('loadedGoogletag', true);
|
||||||
@ -229,6 +231,8 @@ export default Ember.Component.extend({
|
|||||||
window.googletag.pubads().refresh([slot.ad]);
|
window.googletag.pubads().refresh([slot.ad]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}).finally(function() {
|
||||||
|
String.prototype.w = ember_w_function;
|
||||||
});
|
});
|
||||||
}.on('didInsertElement'),
|
}.on('didInsertElement'),
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user