Skip to content

Commit 20ba903

Browse files
committed
Merge pull request sql-js#76 from firien/bindnull-fix
Fix a bug in `api.coffee` that makes sql.js throw an error when binding a null value to a statement.
2 parents b0aa738 + 3b9da29 commit 20ba903

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

coffee/api.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ class Statement
186186
when "number","boolean" then @bindNumber val+0, pos
187187
when "object"
188188
if val is null then @bindNull pos
189-
if val.length? then @bindBlob val, pos
189+
else if val.length? then @bindBlob val, pos
190190
else throw "Wrong API use : tried to bind a value of an unknown type (#{val})."
191191
### Bind names and values of an object to the named parameters of the statement
192192
@param [Object]

0 commit comments

Comments
 (0)