Skip to content

Commit

Permalink
updated from moscajs#449
Browse files Browse the repository at this point in the history
  • Loading branch information
behrad committed Apr 22, 2016
1 parent 6dc28e8 commit 0522b26
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 19 deletions.
16 changes: 0 additions & 16 deletions lib/persistence/abstract.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,22 +138,6 @@ AbstractPersistence.prototype.wire = function(server) {
};
};

function arrayFrom(object) {
return [].slice.call(object);
}

/**
* Array.from polyfill
* @param aSet the set to changed to an array
*/
AbstractPersistence.prototype.arrayFrom = function(aSet) {
if (Array.from) {
return Array.from(aSet);
} else {
return arrayFrom(aSet);
}
};

/**
* Close the persistance.
*
Expand Down
2 changes: 1 addition & 1 deletion lib/persistence/levelup.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ LevelUpPersistence.prototype.lookupSubscriptions = function(client, done) {
LevelUpPersistence.prototype.storeOfflinePacket = function(packet, done) {
var that = this;
var subs = this._subMatcher.match(packet.topic);
async.each(this.arrayFrom(subs), function(key, cb) {
async.each(subs, function(key, cb) {
that._subscriptions.get(key, function(err, sub) {
if (err) {
return cb(err);
Expand Down
2 changes: 1 addition & 1 deletion lib/persistence/redis.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ RedisPersistence.prototype.storeOfflinePacket = function(packet, done) {
var that = this;

var matches = this._subMatcher.match(packet.topic);
async.each(this.arrayFrom(matches), function(client, cb) {
async.each(matches, function(client, cb) {
that._storePacket(client, packet, cb);
}, done);
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
},
"dependencies": {
"ascoltatori": "^2.0.0",
"async": "~1.5.2",
"async": "^2.0.0-rc.3",
"brfs": "~1.4.2",
"bunyan": "^1.5.1",
"clone": "^1.0.2",
Expand Down

0 comments on commit 0522b26

Please sign in to comment.