Skip to content

Commit

Permalink
add sub only if it's not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
pidoubleyou committed Apr 29, 2024
1 parent e6624e1 commit c71545b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ private Optional<String> formatTitle(Optional<String> title, Optional<String> su
if (title.isEmpty()) {
return Optional.empty();
}
if (sub.isPresent()) {
if (sub.isPresent() && !sub.get().trim().isEmpty()) {
return Optional.of(title.get().trim() + " - " + sub.get().trim());
} else {
return Optional.of(title.get().trim());
Expand Down

0 comments on commit c71545b

Please sign in to comment.