#522 TypeAhead.pm can reference empty data (inphobia)
This commit is contained in:
@@ -49,7 +49,7 @@ ajax '/ajax/data/port/typeahead' => require_login sub {
|
|||||||
if $port;
|
if $port;
|
||||||
|
|
||||||
my $results = [
|
my $results = [
|
||||||
map {{ label => (sprintf "%s (%s)", $_->port, $_->name), value => $_->port }}
|
map {{ label => (sprintf "%s (%s)", $_->port, ($_->name || '')), value => $_->port }}
|
||||||
sort { &App::Netdisco::Util::Web::sort_port($a->port, $b->port) } $set->all
|
sort { &App::Netdisco::Util::Web::sort_port($a->port, $b->port) } $set->all
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user