1
Fork 0

Correctly await things.

This commit is contained in:
Bauke 2022-03-03 15:01:06 +01:00
parent 394ab8c9d3
commit 492673d71d
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
3 changed files with 5 additions and 2 deletions

View File

@ -34,7 +34,7 @@ const migrations: Array<Migration<string>> = [
];
// Migrate your data.
const migrated = migrate(data, version, migrations);
const migrated = await migrate(data, version, migrations);
// Congratulations, your data is now on version 1.0.2!
console.log(migrated);

View File

@ -53,6 +53,9 @@
},
"xo": {
"prettier": true,
"rules": {
"no-await-in-loop": "off"
},
"space": true
}
}

View File

@ -44,7 +44,7 @@ export async function migrate<V>(
continue;
}
migratedData = migration.migrate(migratedData);
migratedData = await migration.migrate(migratedData);
}
return migratedData;