From 124546530b7098c52e98ee727093abf3f3ff84a1 Mon Sep 17 00:00:00 2001 From: Leon Ho Date: Tue, 17 Jan 2017 14:06:58 -0800 Subject: [PATCH] OpenX Adapter: Fixed bug regarding cross-domain iframe support --- src/adapters/openx.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/adapters/openx.js b/src/adapters/openx.js index 7033ee5482a..fe889cd9d78 100644 --- a/src/adapters/openx.js +++ b/src/adapters/openx.js @@ -68,8 +68,13 @@ const OpenxAdapter = function OpenxAdapter() { body; if (isIfr) { - tWin = window.top; - tDoc = window.top.document; + try { + tWin = window.top; + tDoc = window.top.document; + } + catch (e) { + return; + } docEl = tDoc.documentElement; body = tDoc.body;