From 8f8ae6fcdfd8985a5613fdaa6277f44eebd9de1f Mon Sep 17 00:00:00 2001 From: Jeremy Penner Date: Tue, 15 Feb 2011 08:46:02 -0800 Subject: [PATCH] don't link next section if we can't find next section --- iffy.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iffy.coffee b/iffy.coffee index 92c788a..4210833 100644 --- a/iffy.coffee +++ b/iffy.coffee @@ -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 = $("
") for dHTML in $(@dNev).contents()