Skip to content

Commit

Permalink
Forgot to quote the joined array in where()
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Oct 18, 2018
1 parent 9c2dab3 commit f436b60
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/haro.js
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@
let result;
if (Array.isArray(predicate[i])) {
result = `Array.isArray(a['${i}']) ? ${predicate[i].map(arg => `a['${i}'].includes(${typeof arg === "string" ? `'${arg}'` : arg})`).join(" || ")} : a['${i}'] === ${predicate[i].join(",")}`;
result = `Array.isArray(a['${i}']) ? ${predicate[i].map(arg => `a['${i}'].includes(${typeof arg === "string" ? `'${arg}'` : arg})`).join(" || ")} : a['${i}'] === '${predicate[i].join(",")}'`;
} else {
const arg = typeof predicate[i] === "string" ? `'${predicate[i]}'` : predicate[i];
Expand Down
Loading

0 comments on commit f436b60

Please sign in to comment.