Diff

util/pubsub.lua @ 3931:6daed692264f

util.pubsub: get_items(): When requesting a specific item, use the id as a key to mirror the multiple-item case
author Matthew Wild <mwild1@gmail.com>
date Wed, 22 Dec 2010 02:13:26 +0000
parent 3928:4dfb345e33ec
child 3934:4bd994df7296
line wrap: on
line diff
--- a/util/pubsub.lua	Tue Dec 21 22:26:22 2010 +0000
+++ b/util/pubsub.lua	Wed Dec 22 02:13:26 2010 +0000
@@ -227,7 +227,7 @@
 		return false, "item-not-found";
 	end
 	if id then -- Restrict results to a single specific item
-		return true, { node_obj.data[id] };
+		return true, { [id] = node_obj.data[id] };
 	else
 		return true, node_obj.data;
 	end