Skip to content

Commit

Permalink
fix "Search pattern not terminated"
Browse files Browse the repository at this point in the history
  • Loading branch information
Azq2 committed Jun 29, 2021
1 parent 4248bbe commit b52cfe5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@
- update modest
2021-06-26 1.20 - fix link to issues
2021-06-26 1.21 - fix link to issues
2021-06-29 1.22 - replace re:;is_regexp to ref() check for older perl versions
2021-06-29 1.22 - replace re::is_regexp to ref() check for older perl versions
2021-06-29 1.23 - fix "Search pattern not terminated"
2 changes: 1 addition & 1 deletion lib/HTML5/DOM.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use HTML5::DOM::Collection;
use HTML5::DOM::CSS;
use HTML5::DOM::TokenList;

our $VERSION = '1.22';
our $VERSION = '1.23';
require XSLoader;

# https://developer.mozilla.org/pl/docs/Web/API/Element/nodeType
Expand Down
2 changes: 1 addition & 1 deletion lib/HTML5/DOM/Collection.pm
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ sub each {
sub uniq {
my ($self, $callback) = (shift, shift);
my %used;
return HTML5::DOM::Collection->new([grep { !$used{$_->$callback(@_) // ''}++ } @$self]) if ($callback);
return HTML5::DOM::Collection->new([grep { my $id = $_->$callback(@_); !$used{defined($id) ? $id : ''}++ } @$self]) if ($callback);
return HTML5::DOM::Collection->new([grep { !$used{$_->hash}++ } @$self]);
}

Expand Down

0 comments on commit b52cfe5

Please sign in to comment.