Parcelforce: Skip queries that start with ISBN.
Also added a check if `$parcel_number` exists in the first place.master
parent
9c61d96fa7
commit
ef7a86d7d0
|
@ -34,6 +34,13 @@ triggers query_nowhitespace_nodash => qr/
|
|||
|
||||
handle query_nowhitespace_nodash => sub {
|
||||
my $parcel_number = $+{parcel_number};
|
||||
|
||||
# Exit if $parcel_number doesn't exist.
|
||||
return unless $parcel_number;
|
||||
|
||||
# Exit if $parcel_number starts with ISBN.
|
||||
return if $parcel_number =~ /^isbn/i;
|
||||
|
||||
return $parcel_number,
|
||||
heading => 'Parcelforce Tracking',
|
||||
html =>
|
||||
|
|
Loading…
Reference in New Issue