Skip to content

Commit

Permalink
Merge pull request sql-js#76 from firien/bindnull-fix
Browse files Browse the repository at this point in the history
Fix a bug in `api.coffee` that makes sql.js throw an error when binding a null value to a statement.
  • Loading branch information
lovasoa committed Nov 26, 2014
2 parents b0aa738 + 3b9da29 commit 20ba903
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coffee/api.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class Statement
when "number","boolean" then @bindNumber val+0, pos
when "object"
if val is null then @bindNull pos
if val.length? then @bindBlob val, pos
else if val.length? then @bindBlob val, pos
else throw "Wrong API use : tried to bind a value of an unknown type (#{val})."
### Bind names and values of an object to the named parameters of the statement
@param [Object]
Expand Down

0 comments on commit 20ba903

Please sign in to comment.