From 44369a621c41844938a40aef758be16c2c05990a Mon Sep 17 00:00:00 2001 From: jodros <15092760+jodros@users.noreply.github.com> Date: Mon, 25 Dec 2023 22:52:33 -0300 Subject: [PATCH] fix: no error '! Couldn't find frame ID folio' anymore --- packages/folio/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/folio/init.lua b/packages/folio/init.lua index 85e4c00e7c..d4253a79a5 100644 --- a/packages/folio/init.lua +++ b/packages/folio/init.lua @@ -18,8 +18,8 @@ function package:outputFolio (frame) SILE.scratch.counters.folio.off = false end else - local folioFrame = SILE.getFrame(frame) - if (folioFrame) then + local success, folioFrame = pcall(SILE.getFrame(frame)) + if success then SILE.typesetNaturally(folioFrame, function () SILE.settings:pushState() -- Restore the settings to the top of the queue, which should be the document #986