From 54cfe7daf32242b6fc8f60c44664d1e179e206ff Mon Sep 17 00:00:00 2001 From: Timur Ercan Date: Mon, 20 Feb 2023 14:51:50 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/lib/webstorage.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/lib/webstorage.ts b/packages/lib/webstorage.ts index 47cbd00e3..dee4c5b20 100644 --- a/packages/lib/webstorage.ts +++ b/packages/lib/webstorage.ts @@ -1,22 +1,19 @@ -// TODO: In case of an embed if localStorage is not available(third party), use localStorage of parent(first party) that contains the iframe. export const localStorage = { getItem(key: string) { try { - // eslint-disable-next-line @calcom/eslint/avoid-web-storage return window.localStorage.getItem(key); } catch (e) { // In case storage is restricted. Possible reasons - // 1. Third Party Context in Chrome Incognito mode. + // 1. Chrome/Firefox/... Incognito mode. return null; } }, setItem(key: string, value: string) { try { - // eslint-disable-next-line @calcom/eslint/avoid-web-storage window.localStorage.setItem(key, value); } catch (e) { // In case storage is restricted. Possible reasons - // 1. Third Party Context in Chrome Incognito mode. + // 1. Chrome/Firefox/... Incognito mode. // 2. Storage limit reached return; }