This commit is contained in:
Manav Rathi
2024-11-19 19:48:59 +05:30
parent 5c6784c549
commit 91ddce1425
2 changed files with 5 additions and 4 deletions

View File

@@ -20,9 +20,11 @@ export const storeCastData = (payload: unknown) => {
// localStorage. We don't validate here, we'll validate when we read these
// values back in `readCastData`.
for (const [key, value] of Object.entries(payload)) {
typeof value == "string" || typeof value == "number"
? localStorage.setItem(key, value.toString())
: localStorage.removeItem(key);
if (typeof value == "string" || typeof value == "number") {
localStorage.setItem(key, value.toString());
} else {
localStorage.removeItem(key);
}
}
};

View File

@@ -83,7 +83,6 @@ export const register = async (): Promise<Registration> => {
// eslint has fixed this spurious warning, but we're not on the latest
// version yet, so add a disable.
// https://github.com/eslint/eslint/pull/18286
/* eslint-disable no-constant-condition */
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
while (true) {
try {