don't link next section if we can't find next section

This commit is contained in:
Jeremy Penner 2011-02-15 08:46:02 -08:00
parent 6129bbce17
commit 8f8ae6fcdf

View file

@ -311,7 +311,9 @@ class Nev
StHtmlNextSection: (gst, wst) ->
stSectionNext = $(@dNev).attr("nextsection")
if stSectionNext?
gst.Link("Next section", () -> gst.PushSection(gst.story.SectionByName(stSectionNext), wst))
section = gst.story.SectionByName(stSectionNext)
if section?
gst.Link("Next section", () -> gst.PushSection(section, wst))
StHtmlDisplay: (gst, wst) ->
jdivTmp = $("<div/>")
for dHTML in $(@dNev).contents()