Skip to content

Commit

Permalink
improved performance a little bit more for many common cases
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 26, 2014
1 parent 7e28990 commit be8e643
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Mojo/DOM.pm
Expand Up @@ -327,7 +327,7 @@ sub _siblings {
my $tree = $self->tree;
my (@before, @after, $match);
for my $node (_nodes($parent->tree)) {
++$match and next if $node eq $tree;
++$match and next if !$match && $node eq $tree;
next unless $all || $node->[0] eq 'tag';
$match ? push @after, $node : push @before, $node;
}
Expand Down

0 comments on commit be8e643

Please sign in to comment.