From 1ce59c3c6b20e2687b033d85b630dd1fa0ab1840 Mon Sep 17 00:00:00 2001 From: Sushil K Jain Date: Fri, 7 Jul 2017 12:00:19 +0530 Subject: [PATCH] BUG FIXED: all channel members are restored wrong BUG RESOLVED: all channel members were restored in wrong (mostly in last) channel, due to over-written value of 'name' - because for loop runs fast and callback (in "load" function) gets the value of 'name' wrong. --- lib/common/service/channelService.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/common/service/channelService.js b/lib/common/service/channelService.js index 8969a3fde..f3f45e9cd 100644 --- a/lib/common/service/channelService.js +++ b/lib/common/service/channelService.js @@ -462,7 +462,7 @@ var restoreChannel = function(self, cb) { utils.invokeCallback(cb); return; } - var load = function(key) { + var load = function(key, name) { return (function() { loadAllFromStore(self, key, function(err, items) { for(var j=0; j