diff --git a/app/store/validateMigration/validateMigration.ts b/app/store/validateMigration/validateMigration.ts index 21d6cae5db2..0638d65b680 100644 --- a/app/store/validateMigration/validateMigration.ts +++ b/app/store/validateMigration/validateMigration.ts @@ -18,14 +18,7 @@ const checks: ValidationCheck[] = [ * This makes sure your app keeps running even if some data is unexpected. */ export function validatePostMigrationState(state: RootState): void { - const allErrors: string[] = []; - - for (const check of checks) { - const errors = check(state); - if (errors.length > 0) { - allErrors.push(...errors); - } - } + const allErrors = checks.flatMap((check) => check(state)); // If there are any errors, log them if (allErrors.length > 0) {