Skip to content

Commit

Permalink
fix invalid argument type for get_child
Browse files Browse the repository at this point in the history
Should be an int not a double.
  • Loading branch information
defunctzombie committed Jan 26, 2012
1 parent 81f675d commit abe5454
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -2,7 +2,7 @@
, "author" : "Marco Rogers - http://github.com/polotek"
, "contributors" : ["Jeff Smick"]
, "description" : "libxml bindings for v8 javascript engine"
, "version" : "0.5.0"
, "version" : "0.5.1"
, "scripts" :
{ "install" : "node-waf configure build"
, "preuninstall" : "node-waf clean"
Expand Down
4 changes: 2 additions & 2 deletions src/xml_element.cc
Expand Up @@ -203,8 +203,8 @@ XmlElement::ChildNodes(const v8::Arguments& args) {
XmlElement* element = ObjectWrap::Unwrap<XmlElement>(args.Holder());
assert(element);

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

return scope.Close(element->get_child_nodes());
}
Expand Down

0 comments on commit abe5454

Please sign in to comment.