Produce prev link only if it's not empty

This commit is contained in:
Las Zenow 2013-05-28 01:22:22 +02:00
parent 41258ee863
commit 155144d86e

View file

@ -75,7 +75,9 @@ func getNextPrev(e *epubgo.Epub, file string, id string, base string) (string, s
return "", ""
}
prev = genLink(id, base, prev)
if prev != "" {
prev = genLink(id, base, prev)
}
if spine.Next() == nil {
next = genLink(id, base, spine.Url())
}