minor fix

This commit is contained in:
Nazar Kanaev 2020-09-09 22:45:48 +01:00
parent 4b7a8679f2
commit c5774c3a5a

View File

@ -23,7 +23,7 @@ func (s *Storage) CreateFeed(title, description, link, feedLink string, folderId
title = link title = link
// use domain if possible // use domain if possible
linkUrl, err := url.Parse(link) linkUrl, err := url.Parse(link)
if err != nil && len(linkUrl.Host) > 0 && len(linkUrl.Path) <= 1 { if err == nil && linkUrl.Host != "" && len(linkUrl.Path) <= 1 {
title = linkUrl.Host title = linkUrl.Host
} }
} }