Apply prefer-const lint rule
This commit is contained in:
1 parent
b43088c03c
commit
09e6a360af
26 files changed
+217
-215
No files matched your search
+2
-2
@@ -592,7 +592,7 @@ function listener(request, response) {
|
||||
let projection = null;
|
||||
if (urlParts.query.projection) {
|
||||
projection = {};
|
||||
for (let p of urlParts.query.projection.split(","))
|
||||
for (const p of urlParts.query.projection.split(","))
|
||||
projection[p.trim()] = 1;
|
||||
}
|
||||
|
||||
@@ -601,7 +601,7 @@ function listener(request, response) {
|
||||
if (urlParts.query.sort) {
|
||||
const s = JSON.parse(urlParts.query.sort);
|
||||
const sort = {};
|
||||
for (let [k, v] of Object.entries(s)) {
|
||||
for (const [k, v] of Object.entries(s)) {
|
||||
if (k[k.lastIndexOf(".") + 1] !== "_" && collectionName === "devices")
|
||||
sort[`${k}._value`] = v;
|
||||
else sort[k] = v;
|
||||
|
||||
Reference in new issue
Block a user