From c93dc03ca7efbd49dbcd268eabf2f2f4af840333 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Thu, 14 May 2026 08:30:26 +0200 Subject: [PATCH] Journal robustness --- libraries/Library/Std/Journal/Journal.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libraries/Library/Std/Journal/Journal.md b/libraries/Library/Std/Journal/Journal.md index 633a0ad4..a9b882e3 100644 --- a/libraries/Library/Std/Journal/Journal.md +++ b/libraries/Library/Std/Journal/Journal.md @@ -91,12 +91,16 @@ function journal.neighbor(direction) end if direction == "previous" then for _, e in ipairs(entries) do - if e.date < pivot then return e end + if e.date < pivot then + return e + end end else local result for _, e in ipairs(entries) do - if e.date > pivot then result = e end + if e.date and e.date > pivot then + result = e + end end return result end