From 88f495f156a5f9db894de1728ebd7c5020882f31 Mon Sep 17 00:00:00 2001 From: Harshad Mane Date: Tue, 13 Aug 2019 15:19:35 -0700 Subject: [PATCH] added try-catch as the statement code was breaking CI for IE-11 --- modules/widespaceBidAdapter.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/widespaceBidAdapter.js b/modules/widespaceBidAdapter.js index 28b2e377540..9bf45de4f1c 100644 --- a/modules/widespaceBidAdapter.js +++ b/modules/widespaceBidAdapter.js @@ -8,6 +8,7 @@ import { } from '../src/utils'; import includes from 'core-js/library/fn/array/includes'; import find from 'core-js/library/fn/array/find'; +import { utils } from 'mocha'; const BIDDER_CODE = 'widespace'; const WS_ADAPTER_VERSION = '2.0.1'; @@ -177,8 +178,11 @@ export const spec = { function storeData(data, name, stringify = true) { const value = stringify ? JSON.stringify(data) : data; if (LOCAL_STORAGE_AVAILABLE) { - localStorage.setItem(name, value); - return true; + // adding try-catch as this code was breaking CI for IE-11 + try{ + localStorage.setItem(name, value); + return true; + }catch(e){} } else if (COOKIE_ENABLED) { const theDate = new Date(); const expDate = new Date(theDate.setMonth(theDate.getMonth() + 12)).toGMTString();