mod_admin_shell: Fix traceback on rendering graph of stats without extra labels
authorKim Alvefur <zash@zash.se>
Sat, 29 Jan 2022 15:01:38 +0100
changeset 12230 7db81c9cbbbf
parent 12229 e9f34a04067e
child 12231 88958c0ecab3
mod_admin_shell: Fix traceback on rendering graph of stats without extra labels Stops an error when extra_labels is nil since it attempts to index it Unsure about correctness
plugins/mod_admin_shell.lua
--- a/plugins/mod_admin_shell.lua	Sat Jan 29 14:58:37 2022 +0100
+++ b/plugins/mod_admin_shell.lua	Sat Jan 29 15:01:38 2022 +0100
@@ -1653,7 +1653,7 @@
 			sum = value
 		elseif suffix == "_count" then
 			count = value
-		else
+		elseif extra_labels then
 			local bucket_threshold = extra_labels["le"]
 			local bucket_count
 			if cumulative then