Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 4543668

Browse files
vicbtravis@travis-ci.org
authored and
travis@travis-ci.org
committed
perf(NodeCursor): Do not duplicate child nodes
1 parent 0c22a3b commit 4543668

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: lib/core_dom/node_cursor.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ class NodeCursor {
1313

1414
bool descend() {
1515
var childNodes = elements[index].nodes;
16-
var hasChildren = childNodes != null && childNodes.isNotEmpty;
16+
var hasChildren = childNodes.isNotEmpty;
1717

1818
if (hasChildren) {
1919
stack..add(index)..add(elements);
20-
elements = new List.from(childNodes);
20+
elements = childNodes;
2121
index = 0;
2222
}
2323

0 commit comments

Comments
 (0)