diff --git a/packages/waas/src/intents/base.ts b/packages/waas/src/intents/base.ts index 431f31b0a..99f3df9eb 100644 --- a/packages/waas/src/intents/base.ts +++ b/packages/waas/src/intents/base.ts @@ -20,7 +20,7 @@ function isSessionStorageAvailable() { export function getTimeDrift() { if (isSessionStorageAvailable()) { - const drift = sessionStorage.getItem(timeDriftKey) + const drift = window.sessionStorage.getItem(timeDriftKey) if (drift) { return parseInt(drift, 10) } @@ -31,7 +31,7 @@ export function getTimeDrift() { export function updateTimeDrift(serverTime: Date) { timeDrift = (Date.now() - serverTime.getTime()) / 1000 if (isSessionStorageAvailable()) { - sessionStorage.setItem(timeDriftKey, timeDrift.toString(10)) + window.sessionStorage.setItem(timeDriftKey, timeDrift.toString(10)) } }