@@ -267,8 +267,9 @@ writeEPUB opts doc@(Pandoc meta _) = do
267267 , unode "guide" $
268268 [ unode "reference" !
269269 [("type","toc"),("title",plainTitle),("href","nav.xhtml")] $ ()
270− , unode "reference" !
271− [("type","cover"),("title","Cover"),("href","cover.xhtml")] $ ()
270+ ] ++
271+ [ unode "reference" !
272+ [("type","cover"),("title","Cover"),("href","cover.xhtml")] $ () | mbCoverImage /= Nothing
272273 ]
273274 ]
274275 let contentsEntry = mkEntry "content.opf" contentsData