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

Commit

Permalink
perf(NodeCursor): Do not duplicate child nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
vicb authored and [email protected] committed May 20, 2014
1 parent 0c22a3b commit 4543668
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/core_dom/node_cursor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ class NodeCursor {

bool descend() {
var childNodes = elements[index].nodes;
var hasChildren = childNodes != null && childNodes.isNotEmpty;
var hasChildren = childNodes.isNotEmpty;

if (hasChildren) {
stack..add(index)..add(elements);
elements = new List.from(childNodes);
elements = childNodes;
index = 0;
}

Expand Down

0 comments on commit 4543668

Please sign in to comment.