mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-03 06:28:53 +00:00
fix(utils/parseTransaction): check for array
This commit is contained in:
1 parent
fd8ab04f1a
commit
db0f29db42
1 file changed
+1
-1
@@ -18,7 +18,7 @@ export const parseTransaction = (
|
|||||||
|
|
||||||
if (parameters === null || parameters === undefined || typeof parameters === 'function') parameters = [];
|
if (parameters === null || parameters === undefined || typeof parameters === 'function') parameters = [];
|
||||||
|
|
||||||
if (queries[0][0]) {
|
if (Array.isArray(queries[0])) {
|
||||||
const transactions = queries.map((query) => {
|
const transactions = queries.map((query) => {
|
||||||
if (typeof query[1] !== 'object') throw new Error(`Transaction parameters must be array or object, received '${typeof query[1]}'.`);
|
if (typeof query[1] !== 'object') throw new Error(`Transaction parameters must be array or object, received '${typeof query[1]}'.`);
|
||||||
const [parsedQuery, parsedParameters] = parseArguments(
|
const [parsedQuery, parsedParameters] = parseArguments(
|
||||||
|
|||||||
Reference in new issue
Block a user