faster message iteration

pull/1/head
ansuz 8 years ago
parent b46f74cd78
commit 38d1a1a291

@ -148,8 +148,10 @@ var getMessages = function (env, chanName, handler, cb) {
} }
try { try {
chan.messages chan.messages
.filter(function (x) { return x; }) .forEach(function (message) {
.forEach(handler); if (!message) { return; }
handler(message);
});
} catch (err2) { } catch (err2) {
console.error(err2); console.error(err2);
cb(err2); cb(err2);

Loading…
Cancel
Save