Skip to content

Commit

Permalink
fix: check if urlTemplate not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
lnu committed Jan 16, 2021
1 parent 7a3cf32 commit 9d80197
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/segment_language.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ func (l *language) string() string {

// build release notes hyperlink
if l.props.getBool(EnableHyperlink, false) {
// if url template is blank in the confi file
if l.urlTemplate == "" {
return l.version
}
version, err := TruncatingSprintf(l.urlTemplate, l.version, l.major, l.minor, l.patch)
if err != nil {
return l.version
Expand Down

0 comments on commit 9d80197

Please sign in to comment.