Skip to content

Commit

Permalink
fix(truncate): fix missing await in truncate all models with cascade (
Browse files Browse the repository at this point in the history
  • Loading branch information
bmeriaux committed Sep 1, 2020
1 parent 490db41 commit 933b3f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sequelize.js
Expand Up @@ -819,7 +819,7 @@ class Sequelize {
}, { reverse: false });

if (options && options.cascade) {
for (const model of models) model.truncate(options);
for (const model of models) await model.truncate(options);
} else {
await Promise.all(models.map(model => model.truncate(options)));
}
Expand Down

0 comments on commit 933b3f6

Please sign in to comment.