Produce prev link only if it's not empty
This commit is contained in:
parent
41258ee863
commit
155144d86e
1 changed files with 3 additions and 1 deletions
|
@ -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())
|
||||
}
|
||||
|
|
Reference in a new issue