Skip to content

Commit

Permalink
Merge pull request #1452 from wubzz/bugfix/invalid_compilation_of_raw…
Browse files Browse the repository at this point in the history
…_when_used_as_binding

Any binding that is an object/class containing the function .toSQL mu…
  • Loading branch information
wubzz committed May 26, 2016
2 parents 1544fcd + dbc4173 commit 21cede3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/raw.js
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 21cede3

Please sign in to comment.