Do not retrieve already persisted data as well (#20982)

This commit is contained in:
Hariom Balhara authored and GitHub committed 2025-04-26 17:32:08 +05:30
1 parent edd80c056c
commit 31cbea0e23
1 file changed
+8 -10
@@ -1,6 +1,3 @@
import logger from "@calcom/lib/logger";
import { localStorage } from "@calcom/lib/webstorage";
// const responsesToStore = ["email", "name"];
// eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -14,11 +11,12 @@ export const setLastBookingResponse = (responses: Record<string, unknown> | null
};
export const getLastBookingResponse = () => {
const lastBookingResponse = localStorage.getItem("lastBookingResponse");
try {
return JSON.parse(lastBookingResponse ?? "{}");
} catch (err) {
logger.error("Error parsing lastBookingResponse: ", err);
return {};
}
return {};
// const lastBookingResponse = localStorage.getItem("lastBookingResponse");
// try {
// return JSON.parse(lastBookingResponse ?? "{}");
// } catch (err) {
// logger.error("Error parsing lastBookingResponse: ", err);
// return {};
// }
};