Skip to content

Commit

Permalink
fix(utils): Do not convert placeholders if query contains JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
thelindat committed Feb 23, 2022
1 parent 9ab2bcb commit e29ca87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/parseArguments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const parseArguments = (

const queryParams = query.match(/\?(?!\?)/g);

if (query.includes(':') || query.includes('@')) {
if ((typeof parameters && !Array.isArray(parameters) && query.includes(':')) || query.includes('@')) {
const placeholders = convertNamedPlaceholders(query, parameters);
query = placeholders[0];
parameters = placeholders[1];
Expand Down

0 comments on commit e29ca87

Please sign in to comment.