Skip to content

Commit

Permalink
Any binding that is an object/class containing the function .toSQL mu…
Browse files Browse the repository at this point in the history
…st be processed as an Array in Raw's toSQL.
  • Loading branch information
wubzz committed May 26, 2016
1 parent 9118e05 commit dbc4173
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/raw.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ assign(Raw.prototype, {
set(sql, bindings) {
this._cached = undefined
this.sql = sql
this.bindings = (isObject(bindings) || isUndefined(bindings)) ? bindings : [bindings]
this.bindings = ((isObject(bindings) && !bindings.toSQL) || isUndefined(bindings)) ? bindings : [bindings]

return this
},
Expand Down

0 comments on commit dbc4173

Please sign in to comment.