From e12fc874c828150e2aa87574b7a240552a6aaf4e Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 5 Dec 2023 14:09:59 +0100 Subject: [PATCH] Fix test when no migrations exist --- packages/server/src/appMigrations/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/appMigrations/index.ts b/packages/server/src/appMigrations/index.ts index 3efe38e55a..b1a2b742bc 100644 --- a/packages/server/src/appMigrations/index.ts +++ b/packages/server/src/appMigrations/index.ts @@ -8,7 +8,7 @@ export const latestMigration = MIGRATIONS.map(m => m.migrationId) .sort() .reverse()[0] -const getTimestamp = (versionId: string) => versionId.split("_")[0] +const getTimestamp = (versionId: string) => versionId?.split("_")[0] export async function checkMissingMigrations(appId: string) { const currentVersion = await getAppMigrationVersion(appId)