Skip to content

Commit 0064696

Browse files
committed
Properly set vars as const
1 parent 073ca25 commit 0064696

File tree

1 file changed

+3
-12
lines changed
  • viplab-standalone-frontend-vue/src/components/viplab-plots

1 file changed

+3
-12
lines changed

viplab-standalone-frontend-vue/src/components/viplab-plots/parse.js

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ export default function Parse(viplabFile) {
1212
};
1313

1414
this.parseFileToJson = function () {
15-
const json = JSON.parse(this.file.replace(/\n/g, '\\n'));
16-
return json;
15+
return JSON.parse(this.file.replace(/\n/g, '\\n'));
1716
};
1817

1918
this.parseValues = function (json) {
@@ -63,20 +62,12 @@ export default function Parse(viplabFile) {
6362
[, , height] = splitLine;
6463
break;
6564
case 'min-color': {
66-
let r1;
67-
let g1;
68-
let b1;
69-
// eslint-disable-next-line prefer-const
70-
[, , r1, g1, b1] = splitLine;
65+
const [, , r1, g1, b1] = splitLine;
7166
cmin = `rgb(${r1}, ${g1}, ${b1})`;
7267
break;
7368
}
7469
case 'max-color': {
75-
let r2;
76-
let g2;
77-
let b2;
78-
// eslint-disable-next-line prefer-const
79-
[, , r2, g2, b2] = splitLine;
70+
const [, , r2, g2, b2] = splitLine;
8071
cmax = `rgb(${r2}, ${g2}, ${b2})`;
8172
break;
8273
}

0 commit comments

Comments
 (0)