Skip to content

Commit

Permalink
If the where() function is passed in an array for value, and one of t…
Browse files Browse the repository at this point in the history
…he items in the array is the value 0, it won't be used. Compare to undefined instead.
  • Loading branch information
nicjansma committed Nov 2, 2011
1 parent 8d4e4c9 commit 5211064
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion joli.js
Expand Up @@ -707,7 +707,7 @@ joli.query.prototype = {
var i = 0;

// replace question marks one at a time from the array
while (expression.indexOf('?') != -1 && value[i]) {
while (expression.indexOf('?') != -1 && value[i] !== undefined) {
expression = expression.replace(/\?/i, '"' + value[i] + '"');
i++;
}
Expand Down

0 comments on commit 5211064

Please sign in to comment.