Skip to content

Commit

Permalink
auto merge of servo#2291 : saneyuki/servo/2287, r=jdm
Browse files Browse the repository at this point in the history
  • Loading branch information
bors-servo committed May 2, 2014
2 parents b36b779 + 31cf10c commit 803c922
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/script/dom/node.rs
Expand Up @@ -902,9 +902,7 @@ impl Node {

// http://dom.spec.whatwg.org/#dom-node-parentelement
pub fn GetParentElement(&self) -> Option<JS<Element>> {
self.parent_node.clone()
.filtered(|parent| parent.is_element())
.map(|node| ElementCast::to(&node).unwrap())
self.parent_node.clone().and_then(|parent| ElementCast::to(&parent))
}

// http://dom.spec.whatwg.org/#dom-node-haschildnodes
Expand Down

0 comments on commit 803c922

Please sign in to comment.