Skip to content

Commit 8a3b191

Browse files
matthewlaneMatt Kendall
authored and
Matt Kendall
committed
Catch cross-origin DOMException (#861)
1 parent 05d0bf9 commit 8a3b191

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/adapters/gumgum.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,16 @@ const GumgumAdapter = function GumgumAdapter() {
1010

1111
const bidEndpoint = `https://g2.gumgum.com/hbid/imp`;
1212

13-
const WINDOW = global.top;
14-
const SCREEN = WINDOW.screen;
13+
let WINDOW;
14+
let SCREEN;
15+
16+
try {
17+
WINDOW = global.top;
18+
SCREEN = WINDOW.screen;
19+
} catch (error) {
20+
utils.logError(error);
21+
return;
22+
}
1523

1624
function _callBids({ bids }) {
1725
const browserParams = {

0 commit comments

Comments
 (0)