Skip to content

Commit abe5454

Browse files
committed
fix invalid argument type for get_child
Should be an int not a double.
1 parent 81f675d commit abe5454

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
, "author" : "Marco Rogers - http://github.com/polotek"
33
, "contributors" : ["Jeff Smick"]
44
, "description" : "libxml bindings for v8 javascript engine"
5-
, "version" : "0.5.0"
5+
, "version" : "0.5.1"
66
, "scripts" :
77
{ "install" : "node-waf configure build"
88
, "preuninstall" : "node-waf clean"

src/xml_element.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ XmlElement::ChildNodes(const v8::Arguments& args) {
203203
XmlElement* element = ObjectWrap::Unwrap<XmlElement>(args.Holder());
204204
assert(element);
205205

206-
if (args[0]->IsNumber())
207-
return scope.Close(element->get_child(args[0]->ToNumber()->Value()));
206+
if (args[0]->IsInt32())
207+
return scope.Close(element->get_child(args[0]->Int32Value()));
208208

209209
return scope.Close(element->get_child_nodes());
210210
}

0 commit comments

Comments
 (0)