Diff

util/pubsub.lua @ 7726:29c20eefa306

util.pubsub: Fix item retrieval by including the item order as it was before using util.cache (thanks walduhu)
author Kim Alvefur <zash@zash.se>
date Sat, 19 Nov 2016 17:34:54 +0100
parent 7703:74e755674e0f
child 7727:0011889c928f
line wrap: on
line diff
--- a/util/pubsub.lua	Fri Nov 18 14:08:38 2016 +0100
+++ b/util/pubsub.lua	Sat Nov 19 17:34:54 2016 +0100
@@ -331,6 +331,7 @@
 	else
 		local data = {}
 		for key, value in self.data[node]:items() do
+			data[#data+1] = key;
 			data[key] = value;
 		end
 		return true, data;