mod_presence_cache: Only check set set is empty if it exists
authorKim Alvefur <zash@zash.se>
Sun, 03 Apr 2016 00:55:53 +0200
changeset 2157 aa24d49c47ef
parent 2156 bb4a2e4b7ba7
child 2158 ada71b81425a
mod_presence_cache: Only check set set is empty if it exists
mod_presence_cache/mod_presence_cache.lua
--- a/mod_presence_cache/mod_presence_cache.lua	Sun Apr 03 00:37:11 2016 +0200
+++ b/mod_presence_cache/mod_presence_cache.lua	Sun Apr 03 00:55:53 2016 +0200
@@ -16,9 +16,9 @@
 
 	if jids then
 		jids[full_jid] = nil;
-	end
-	if next(jids) == nil then
-		bare_cache[bare_cache_key] = nil;
+		if next(jids) == nil then
+			bare_cache[bare_cache_key] = nil;
+		end
 	end
 end