Skip to content

Commit 76040a7

Browse files
committed
Multi-statement queries should always return an array.
- at the moment the return type is different depending on how many queries were run. - See: mysqljs/mysql#1367
1 parent 3a0b5cf commit 76040a7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/connection/DbConnection.js

+3
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ module.exports = (
112112
return reject(err);
113113
}
114114
releaseConnection(connection);
115+
if (!Array.isArray(rows)) {
116+
rows = [rows];
117+
}
115118
return resolve(rows);
116119
});
117120
})

0 commit comments

Comments
 (0)