Skip to content

Commit fc374b6

Browse files
committed
fix: fix calling the same pubads API on Bling not overriding the previous one
1 parent 947dac1 commit fc374b6

File tree

4 files changed

+127
-110
lines changed

4 files changed

+127
-110
lines changed

src/createManager.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export class AdManager extends EventEmitter {
9494
Object.keys(this._pubadsProxyQueue).forEach(method => {
9595
if ((this.googletag && !this.googletag.pubadsReady && APIToCallBeforeServiceEnabled.indexOf(method) > -1) ||
9696
this.pubadsReady) {
97-
this.pubadsProxy(this._pubadsProxyQueue[method]);
97+
this._pubadsProxyQueue[method].forEach((params) => this.pubadsProxy(params));
9898
delete this._pubadsProxyQueue[method];
9999
}
100100
});
@@ -468,7 +468,10 @@ export class AdManager extends EventEmitter {
468468
if (!this._pubadsProxyQueue) {
469469
this._pubadsProxyQueue = {};
470470
}
471-
this._pubadsProxyQueue[method] = params;
471+
if (!this._pubadsProxyQueue[method]) {
472+
this._pubadsProxyQueue[method] = [];
473+
}
474+
this._pubadsProxyQueue[method].push(params);
472475
} else {
473476
this._callPubads(params);
474477
}

src/utils/apiList.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// This file is generated by `npm run update-apilist`.
33
// Note that only APIs that's documented in https://developers.google.com/doubleclick-gpt/reference is officially supported.
44

5-
export const gptVersion = 95;
5+
export const gptVersion = 110;
66
export const gptAPI = [
77
["getVersion", "function"],
88
["cmd", "object"],
@@ -15,7 +15,6 @@ export const gptAPI = [
1515
["defineSlot", "function"],
1616
["defineUnit", "function"],
1717
["destroySlots", "function"],
18-
["getSlots", "function"],
1918
["display", "function"],
2019
["companionAds", "function"],
2120
["content", "function"],
@@ -30,7 +29,7 @@ export const gptAPI = [
3029
["slot_manager_instance", "object"],
3130
["pubadsReady", "boolean"]
3231
];
33-
export const pubadsVersion = 95;
32+
export const pubadsVersion = 110;
3433
export const pubadsAPI = [
3534
["set", "function"],
3635
["get", "function"],
@@ -124,7 +123,7 @@ export const slotAPI = [
124123
["visibilityChanged", "function"],
125124
["setFirstLook", "function"],
126125
["getFirstLook", "function"],
127-
["getDefinedId", "function"],
128126
["getEscapedQemQueryId", "function"],
129-
["setSafeFrameConfig", "function"]
127+
["setSafeFrameConfig", "function"],
128+
["getCsiId", "function"]
130129
];

0 commit comments

Comments
 (0)