Skip to content

Commit

Permalink
simplify validate migration function
Browse files Browse the repository at this point in the history
  • Loading branch information
owencraston committed Jan 9, 2025
1 parent 6a43cc3 commit 3f957ac
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions app/store/validateMigration/validateMigration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 3f957ac

Please sign in to comment.