Skip to content

Commit

Permalink
Show '-' on elapsed time if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
moznion committed Apr 4, 2014
1 parent 304c5e7 commit 3e39260
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Ukigumo/Server/Web/ViewFunctions.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ sub ago {
}

sub duration {
Amon2->context->duration->can('duration')->(@_)
my $sec = shift;
if (defined $sec) {
return Amon2->context->duration->can('duration')->($sec);
}
return '-';
}

sub l {
Expand Down

0 comments on commit 3e39260

Please sign in to comment.