Skip to content

Commit 88f495f

Browse files
added try-catch as the statement code was breaking CI for IE-11
1 parent 7320a52 commit 88f495f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

modules/widespaceBidAdapter.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
} from '../src/utils';
99
import includes from 'core-js/library/fn/array/includes';
1010
import find from 'core-js/library/fn/array/find';
11+
import { utils } from 'mocha';
1112

1213
const BIDDER_CODE = 'widespace';
1314
const WS_ADAPTER_VERSION = '2.0.1';
@@ -177,8 +178,11 @@ export const spec = {
177178
function storeData(data, name, stringify = true) {
178179
const value = stringify ? JSON.stringify(data) : data;
179180
if (LOCAL_STORAGE_AVAILABLE) {
180-
localStorage.setItem(name, value);
181-
return true;
181+
// adding try-catch as this code was breaking CI for IE-11
182+
try{
183+
localStorage.setItem(name, value);
184+
return true;
185+
}catch(e){}
182186
} else if (COOKIE_ENABLED) {
183187
const theDate = new Date();
184188
const expDate = new Date(theDate.setMonth(theDate.getMonth() + 12)).toGMTString();

0 commit comments

Comments
 (0)