Skip to content

Commit 894c60e

Browse files
committed
Accept anything with function 'submit' as a query
This allows for passing in custom objects which conform to the query API
1 parent a72bd5c commit 894c60e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/client.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ Client.prototype.copyTo = function (text) {
284284

285285
Client.prototype.query = function(config, values, callback) {
286286
//can take in strings, config object or query object
287-
var query = (config instanceof Query) ? config :
287+
var query = (typeof config.submit == 'function') ? config :
288288
new Query(config, values, callback);
289289
if(this.binary && !query.binary) {
290290
query.binary = true;

0 commit comments

Comments
 (0)