diff --git a/ads/yieldpro.js b/ads/yieldpro.js index 92906fca39e2..e13c59afd92a 100644 --- a/ads/yieldpro.js +++ b/ads/yieldpro.js @@ -49,13 +49,12 @@ export function yieldpro(global, data) { 'yieldpro-request', (done) => { let success = false; - const masterWin = this; - if (!masterWin.showadAMPAdapter) { - masterWin.showadAMPAdapter = { + if (!global.showadAMPAdapter) { + global.showadAMPAdapter = { registerSlot: () => {}, }; - loadScript(this, scriptUrl, () => { - if (masterWin.showadAMPAdapter.inited) { + loadScript(global, scriptUrl, () => { + if (global.showadAMPAdapter.inited) { success = true; } done(success);