diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-22 01:03:27 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-22 01:03:27 +0200 |
commit | bf52ed4a0aedaf440733147e5e7fb086d16e9841 (patch) | |
tree | f23542228f2d6e8d6e647c6e4788f6fa52e45cdc /js/service/Publisher.js | |
parent | 295adcbef7618f4a0b4781c92e4b1c32b31a5f36 (diff) |
add generators to iterate over objects
Diffstat (limited to 'js/service/Publisher.js')
-rw-r--r-- | js/service/Publisher.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/service/Publisher.js b/js/service/Publisher.js index b6ea722ce..d4efa4a80 100644 --- a/js/service/Publisher.js +++ b/js/service/Publisher.js @@ -25,10 +25,10 @@ app.service('Publisher', function () { }; this.publishAll = (data) => { - for (let channel in data) { + for (let [channel, messages] of items(data)) { if (this.channels[channel] !== undefined) { for (let listener of this.channels[channel]) { - listener.receive(data[channel], channel); + listener.receive(messages, channel); } } } |