From 20cdb6fe5c0bd2ec9e80768a9b1f17c8461f785b Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Tue, 12 Dec 2023 22:20:11 -0500 Subject: [PATCH] ensure lastRunVersion is valid --- source/migrations.bs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/migrations.bs b/source/migrations.bs index 29cb36a3..aecb9d35 100644 --- a/source/migrations.bs +++ b/source/migrations.bs @@ -71,11 +71,13 @@ sub runRegistryUserMigrations() ' app versions < 2.0.0 didn't save LastRunVersion at the user level ' fall back to using the apps lastRunVersion lastRunVersion = m.global.app.lastRunVersion - registry_write("LastRunVersion", lastRunVersion, section) + if isValid(lastRunVersion) + registry_write("LastRunVersion", lastRunVersion, section) + end if end if ' BASE_MIGRATION - if not versionChecker(lastRunVersion, CLIENT_VERSION_REQUIRING_BASE_MIGRATION) + if isValid(lastRunVersion) and not versionChecker(lastRunVersion, CLIENT_VERSION_REQUIRING_BASE_MIGRATION) m.wasMigrated = true print `Running Registry Migration for ${CLIENT_VERSION_REQUIRING_BASE_MIGRATION} for userid: ${section}`