Test migration of consolidated settings

This commit is contained in:
Alexander Farber 2025-12-29 23:47:06 +01:00 committed by Mingholy
parent d4fa2e7dd0
commit fd4157a6a1
2 changed files with 75 additions and 1 deletions

View file

@ -280,7 +280,12 @@ export function needsMigration(settings: Record<string, unknown>): boolean {
return true;
});
return hasV1Keys;
// Also check for old inverted boolean keys (disable* -> enable*)
const hasInvertedBooleanKeys = Object.keys(INVERTED_BOOLEAN_MIGRATIONS).some(
(v1Key) => v1Key in settings,
);
return hasV1Keys || hasInvertedBooleanKeys;
}
function migrateSettingsToV2(