Consider Higher StateVersion "ready" (#8255)

This commit is contained in:
Justin Baur 2024-03-08 09:54:12 -06:00 committed by GitHub
parent f90de62adc
commit a803b67f4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -103,8 +103,12 @@ export async function waitForMigrations(
const isReady = async () => {
const version = await currentVersion(storageService, logService);
// The saved version is what we consider the latest
// migrations should be complete
return version === CURRENT_VERSION;
// migrations should be complete, the state version
// shouldn't become larger than `CURRENT_VERSION` in
// any normal usage of the application but it is common
// enough in dev scenarios where we want to consider that
// ready as well and return true in that scenario.
return version >= CURRENT_VERSION;
};
const wait = async (time: number) => {