This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new e968247d Avoid crash if agenda is empty
e968247d is described below

commit e968247def7c599df95ec96bc9b9c47c9edbb79a
Author: Sebb <[email protected]>
AuthorDate: Sun Jun 15 23:46:12 2025 +0100

    Avoid crash if agenda is empty
---
 www/board/agenda/routes.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/board/agenda/routes.rb b/www/board/agenda/routes.rb
index e823189b..92258a67 100755
--- a/www/board/agenda/routes.rb
+++ b/www/board/agenda/routes.rb
@@ -399,7 +399,7 @@ get %r{/(\d\d\d\d-\d\d-\d\d).json} do |date|
 
       # Add banner (or nil) to the first entry
       # must always update the entry as they may be cached
-      agenda.first['banner'] = Status.banner
+      agenda.first['banner'] = Status.banner unless agenda.empty?
       agenda
     end
   ensure

Reply via email to