Commit 4177fb79 by Mohamed Akram

Fix tests failing

parent 421b8ab0
......@@ -264,10 +264,11 @@ template <class T> T* Statement::Bind(const Napi::CallbackInfo& info, int start,
int length = array.Length();
for (int i = 0; i < length; i++) {
Napi::Value name = (array).Get(i);
Napi::Number num = name.ToNumber();
if (name.IsNumber()) {
if (num.Int32Value() == num.DoubleValue()) {
baton->parameters.push_back(
BindParameter((object).Get(name), name.As<Napi::Number>().Int32Value()));
BindParameter((object).Get(name), num.Int32Value()));
}
else {
baton->parameters.push_back(BindParameter((object).Get(name),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment