fix options checks.

This commit is contained in:
Christopher Jeffrey 2014-12-02 03:07:11 -08:00
parent bf80830811
commit 09ed50b7ad

View File

@ -1990,10 +1990,10 @@ NAN_METHOD(GetAddrTransactions) {
String::Utf8Value s_(options->Get(NanNew<String>("addr"))->ToString());
addr = std::string(*s_);
}
if (options->Get(NanNew<String>("index"))->IsString()) {
if (options->Get(NanNew<String>("index"))->IsNumber()) {
blockindex = options->Get(NanNew<String>("index"))->IntegerValue();
}
if (options->Get(NanNew<String>("blockindex"))->IsString()) {
if (options->Get(NanNew<String>("blockindex"))->IsNumber()) {
blockindex = options->Get(NanNew<String>("blockindex"))->IntegerValue();
}
}