changeset 2153:aa24d49c47ef

mod_presence_cache: Only check set set is empty if it exists
author Kim Alvefur <zash@zash.se>
date Sun, 03 Apr 2016 00:55:53 +0200
parents bb4a2e4b7ba7
children ada71b81425a
files mod_presence_cache/mod_presence_cache.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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