about summary refs log tree commit diff
path: root/overlays/patches/public-inbox/0002-view-don-t-500-if-no-mail-received-yet.patch
blob: 4514f208fbb75b178595e7ee1fa1ba8cda6462ea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From e75f974450d7b6a35a5b444a77c133b19490c953 Mon Sep 17 00:00:00 2001
From: Alyssa Ross <hi@alyssa.is>
Date: Thu, 16 Jan 2020 18:09:12 +0000
Subject: [PATCH 2/3] view: don't 500 if no mail received yet

---
 lib/PublicInbox/View.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 374733be..070a288c 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -1077,7 +1077,7 @@ sub acc_topic { # walk_thread callback
 sub dump_topics {
 	my ($ctx) = @_;
 	my $order = delete $ctx->{order}; # [ ds, subj1, subj2, subj3, ... ]
-	if (!@$order) {
+	if (!defined $order || !@$order) {
 		$ctx->{-html_tip} = '<pre>[No topics in range]</pre>';
 		return 404;
 	}
-- 
2.30.0