Use native ES5 map method instead of lodash's
This commit is contained in:
parent
089c315a8e
commit
e905c139d7
@ -458,14 +458,7 @@ Client.prototype.save = function(force) {
|
||||
return;
|
||||
}
|
||||
|
||||
var networks = _.map(
|
||||
this.networks,
|
||||
function(n) {
|
||||
return n.export();
|
||||
}
|
||||
);
|
||||
|
||||
var json = {};
|
||||
json.networks = networks;
|
||||
json.networks = this.networks.map(n => n.export());
|
||||
client.manager.updateUser(client.name, json);
|
||||
};
|
||||
|
@ -143,10 +143,7 @@ ClientManager.prototype.removeUser = function(name) {
|
||||
ClientManager.prototype.autoload = function(/* sockets */) {
|
||||
var self = this;
|
||||
setInterval(function() {
|
||||
var loaded = _.map(
|
||||
self.clients,
|
||||
"name"
|
||||
);
|
||||
var loaded = self.clients.map(c => c.name);
|
||||
var added = _.difference(self.getUsers(), loaded);
|
||||
added.forEach(name => self.loadUser(name));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user