Skip to content

Commit

Permalink
add better guard in the migration
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenruidigao committed Jan 10, 2025
1 parent d17c74b commit 0179da9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/migrateAccountsV2.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ const OldAccount = mongoose.model('OldAccount', OldAccountSchema);
OldAccount.find()
.cursor()
.eachAsync(acc => {
if (acc.version >= 2) {
if (acc.version && acc.version >= 2) {
return;
}

Expand Down

0 comments on commit 0179da9

Please sign in to comment.