Permalink
Browse files

Fix values check

  • Loading branch information...
mscdex committed Sep 12, 2012
1 parent 9c38a1f commit 99bd2cc9bb87f5144fff7166e659e5d5b812f54a
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/Client.js
View
@@ -152,10 +152,9 @@ Client.prototype.destroy = function() {
Client.prototype.query = function(query, values, useArray, promote) {
var results;
- if (Array.isArray(values)) {
- // TODO: cache prepared queries?
+ if (Array.isArray(values) || typeof values === 'object')
query = this.prepare(query)(values);
- } else {
+ else {
promote = useArray;
useArray = values;
}

0 comments on commit 99bd2cc

Please sign in to comment.