Skip to content

Commit

Permalink
Merge pull request #77 from cmadamsgit/master
Browse files Browse the repository at this point in the history
Fix a couple of cases of undefined values
  • Loading branch information
Corion authored Nov 21, 2023
2 parents b913018 + 9113f6d commit f79e8e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/WWW/Mechanize/Chrome.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3503,7 +3503,7 @@ sub base {
my ($self) = @_;
(my $base) = $self->selector('base');
$base = $base->get_attribute('href', live => 1)
if $base;
if $base && defined ($base->{nodeId});
$base ||= $self->uri;
};

Expand Down
2 changes: 1 addition & 1 deletion lib/WWW/Mechanize/Chrome/Node.pm
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ Fetches the tag name of this node
=cut

sub get_tag_name( $self ) {
my $tag = $self->nodeName;
my $tag = $self->nodeName // "";
$tag =~ s!\..*!!; # strip away the eventual classname
$tag
}
Expand Down

0 comments on commit f79e8e9

Please sign in to comment.