Fix various linter errors in dashboard

This commit is contained in:
Tom Bloor 2017-08-30 12:41:28 +01:00
parent cd0dd73c1c
commit 4731ed9a22

View file

@ -98,7 +98,7 @@ export class DashboardComponent implements OnInit {
this.pointsTotal = result.pointstotal; this.pointsTotal = result.pointstotal;
this.averageTransactionToday = result.averagetransactiontoday; this.averageTransactionToday = result.averagetransactiontoday;
} }
) );
} }
// Fisher-Yates shuffle function // Fisher-Yates shuffle function
@ -109,13 +109,13 @@ export class DashboardComponent implements OnInit {
// While there are elements in the array // While there are elements in the array
while (counter > 0) { while (counter > 0) {
// Pick a random index // Pick a random index
let index = Math.floor(Math.random() * counter); const index = Math.floor(Math.random() * counter);
// Decrease counter by 1 // Decrease counter by 1
counter--; counter--;
// And swap the last element with it // And swap the last element with it
let temp = array[counter]; const temp = array[counter];
array[counter] = array[index]; array[counter] = array[index];
array[index] = temp; array[index] = temp;
} }