Add temp check

This commit is contained in:
Manav Rathi
2025-06-10 14:44:59 +05:30
parent a48b40fc0c
commit a0e9d8340c

View File

@@ -35,6 +35,7 @@ import {
type SingleInputFormProps,
} from "ente-base/components/SingleInputForm";
import { useBaseContext } from "ente-base/context";
import { isDevBuild } from "ente-base/env";
import { isHTTPErrorWithStatus } from "ente-base/http";
import log from "ente-base/log";
import { clearSessionStorage } from "ente-base/session";
@@ -151,6 +152,11 @@ const Page: React.FC = () => {
await configureSRP(srpSetupAttributes);
}
}
// TODO(RE): Temporary safety valve before removing the
// unnecessary clear (tag: Migration)
if (isDevBuild && (await localForage.length()) > 0) {
throw new Error("Local forage is not empty");
}
await localForage.clear();
setIsFirstLogin(true);
const redirectURL = unstashRedirect();