diff --git a/source/main/services/migration.ts b/source/main/services/migration.ts index e10d2172..69660a38 100644 --- a/source/main/services/migration.ts +++ b/source/main/services/migration.ts @@ -8,7 +8,10 @@ const MIGRATIONS: Array = [ [ "startInBackground", (config: Config) => { - if (typeof config.preferences["startInBackground"] === "boolean") { + if ( + config.preferences && + typeof config.preferences["startInBackground"] === "boolean" + ) { const prefs = { ...config.preferences }; prefs.startMode = config.preferences["startInBackground"] ? AppStartMode.HiddenAlways