Skip to content

Commit

Permalink
added try-catch as the statement code was breaking CI for IE-11
Browse files Browse the repository at this point in the history
  • Loading branch information
pm-harshad-mane committed Aug 13, 2019
1 parent 7320a52 commit 88f495f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/widespaceBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 88f495f

Please sign in to comment.