Skip to content

Commit

Permalink
GRUE-1114 modified how we read _exp items to work around Prebid's cha…
Browse files Browse the repository at this point in the history
…nges.
  • Loading branch information
Tonsil committed Oct 22, 2024
1 parent df59357 commit 36e5289
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/lotamePanoramaIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,13 @@ function getFromStorage(key) {
if (storedValueExp === '' || storedValueExp === null) {
value = storage.getDataFromLocalStorage(key, undefined);
} else if (storedValueExp) {
if ((new Date(parseInt(storedValueExp, 10))).getTime() - Date.now() > 0) {
let expDate = undefined;
if (/^\d+$/.test(storedValueExp)) {
expDate = new Date(parseInt(storedValueExp, 10));
} else {
expDate = new Date(storedValueExp);
}
if (expDate && !isNaN(expDate) && expDate.getTime() - Date.now() > 0) {
value = storage.getDataFromLocalStorage(key, undefined);
}
}
Expand Down

0 comments on commit 36e5289

Please sign in to comment.