Skip to content

Commit

Permalink
Fixing "ER_EMPTY_QUERY" error
Browse files Browse the repository at this point in the history
The variable i is an object and is used as an index on line 326
  • Loading branch information
monisnap-julien committed Mar 23, 2019
1 parent 3b2f0f6 commit 3b5a4c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -321,7 +321,7 @@ const commit = async (queries,rollback) => {
await query('START TRANSACTION')

// Loop through queries
for (let i in queries) {
for (let i = 0; i < queries.length; i++) {
// Execute the queries, pass the rollback as context
let result = await query.apply({rollback},queries[i](results[results.length-1],results))
// Add the result to the main results accumulator
Expand Down

0 comments on commit 3b5a4c3

Please sign in to comment.