Changed functions to arrow functions for only-arrow-functions rule.

This commit is contained in:
Patrick O'Carroll
2018-09-04 17:02:32 +02:00
parent 0f326f18dc
commit dc4f547a40
36 changed files with 244 additions and 242 deletions

View File

@@ -258,7 +258,7 @@ export class DashboardModel {
}
sortPanelsByGridPos() {
this.panels.sort(function(panelA, panelB) {
this.panels.sort((panelA, panelB) => {
if (panelA.gridPos.y === panelB.gridPos.y) {
return panelA.gridPos.x - panelB.gridPos.x;
} else {
@@ -775,8 +775,8 @@ export class DashboardModel {
getNextQueryLetter(panel) {
const letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
return _.find(letters, function(refId) {
return _.every(panel.targets, function(other) {
return _.find(letters, refId => {
return _.every(panel.targets, other => {
return other.refId !== refId;
});
});