diff options
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r-- | components/script/dom/node.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index d3e6a955284..3032abe0685 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -1452,7 +1452,7 @@ impl Node { 0 => (), // Step 6.1.2 1 => { - if !parent.child_elements().is_empty() { + if !parent.child_elements().peek().is_none() { return Err(Error::HierarchyRequest); } if let Some(child) = child { @@ -1468,7 +1468,7 @@ impl Node { }, // Step 6.2 NodeTypeId::Element(_) => { - if !parent.child_elements().is_empty() { + if !parent.child_elements().peek().is_none() { return Err(Error::HierarchyRequest); } if let Some(ref child) = child { @@ -1495,7 +1495,7 @@ impl Node { } }, None => { - if !parent.child_elements().is_empty() { + if !parent.child_elements().peek().is_none() { return Err(Error::HierarchyRequest); } }, |