Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix

Manav Rathi91ddce142591
diff --git a/web/apps/cast/src/services/cast-data.ts b/web/apps/cast/src/services/cast-data.ts
index 367b3e4dbd..85e9dd8451 100644
--- a/web/apps/cast/src/services/cast-data.ts
+++ b/web/apps/cast/src/services/cast-data.ts
@@ -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);
+ }
}
};
diff --git a/web/apps/cast/src/services/pair.ts b/web/apps/cast/src/services/pair.ts
index 378165eb2b..ae0a8fd98c 100644
--- a/web/apps/cast/src/services/pair.ts
+++ b/web/apps/cast/src/services/pair.ts
@@ -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 {