Skip to content

Commit

Permalink
Fix lodash issues
Browse files Browse the repository at this point in the history
  • Loading branch information
selaux committed Feb 5, 2021
1 parent 4bf2a93 commit 9affeee
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/routes/index.js
Expand Up @@ -18,7 +18,7 @@ module.exports = function (webinterface) {
data = viewableModules.map(function (module) {
return module.attributes;
}),
dataMap = _.object(ids, data);
dataMap = _.zipObject(ids, data);

res.render('index', {
title: app.title,
Expand Down
2 changes: 1 addition & 1 deletion lib/views/aggregatedMiners.js
Expand Up @@ -23,7 +23,7 @@ module.exports = View.extend({
.value();
})
.flatten()
.unique()
.uniq()
.map(function (minerId, it) {
return {
attr: 'currentHashrate.' + minerId,
Expand Down
2 changes: 1 addition & 1 deletion lib/views/mixins/renderHistoricalDataGraph.js
Expand Up @@ -34,7 +34,7 @@ module.exports = function (attributes, element, graphOptions, hoverOptions) {
var self = this;

return _(attributes).filter(function (attr) {
return _.any(self.module.get('historicalData'), function (measurement) {
return _.some(self.module.get('historicalData'), function (measurement) {
return measurement[attr.attr] !== undefined;
});
}).map(function (attr) {
Expand Down
2 changes: 1 addition & 1 deletion lib/views/revenue.js
Expand Up @@ -23,7 +23,7 @@ module.exports = View.extend({
.value();
})
.flatten()
.unique()
.uniq()
.map(function (minerId, it) {
return {
attr: 'revenue.' + minerId,
Expand Down

0 comments on commit 9affeee

Please sign in to comment.