mod_admin_shell: Fix display of session without role (thanks Link Mauve)
authorKim Alvefur <zash@zash.se>
Fri, 23 Sep 2022 11:58:15 +0200
changeset 12731 31d719ce8c64
parent 12730 9f100ab9ffdf
child 12732 931a2d049a91
mod_admin_shell: Fix display of session without role (thanks Link Mauve) This can happen to sessions before they are assigned a role
plugins/mod_admin_shell.lua
--- a/plugins/mod_admin_shell.lua	Wed Sep 21 15:00:06 2022 +0100
+++ b/plugins/mod_admin_shell.lua	Fri Sep 23 11:58:15 2022 +0200
@@ -948,7 +948,7 @@
 		width = 20;
 		key = "role";
 		mapper = function(role)
-			return role.name;
+			return role and role.name;
 		end;
 	}
 };