aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/node.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index 326c080f22e..23041d58a7b 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -1260,7 +1260,7 @@ impl Node {
0 => (),
// Step 6.1.2
1 => {
- if parent.child_elements().peek().is_some() {
+ if !parent.child_elements().is_empty() {
return Err(HierarchyRequest);
}
match child {
@@ -1279,7 +1279,7 @@ impl Node {
},
// Step 6.2
ElementNodeTypeId(_) => {
- if parent.child_elements().peek().is_some() {
+ if !parent.child_elements().is_empty() {
return Err(HierarchyRequest);
}
match child {
@@ -1306,7 +1306,7 @@ impl Node {
}
},
None => {
- if parent.child_elements().peek().is_some() {
+ if !parent.child_elements().is_empty() {
return Err(HierarchyRequest);
}
},