Skip to content

Commit

Permalink
Add missing 'async' in example code (sequelize#14660)
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mattsson authored Jun 19, 2022
1 parent 2c08134 commit fc1b008
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sequelize.js
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ Use Sequelize#query if you wish to use replacements.`);
* @example <caption>A syntax for automatically committing or rolling back based on the promise chain resolution is also supported</caption>
*
* try {
* await sequelize.transaction(transaction => { // Note that we pass a callback rather than awaiting the call with no arguments
* await sequelize.transaction(async transaction => { // Note that we pass a callback rather than awaiting the call with no arguments
* const user = await User.findOne(..., {transaction});
* await user.update(..., {transaction});
* });
Expand Down

0 comments on commit fc1b008

Please sign in to comment.