eslint --fix: let to const

This commit is contained in:
Baptiste Grob
2020-02-04 14:22:02 +01:00
parent c0759980cc
commit 94f5888961
10 changed files with 57 additions and 56 deletions

View File

@@ -107,13 +107,13 @@ export class ModelManager extends SFModelManager {
}
notesMatchingSmartTag(tag) {
let contentTypePredicate = new SFPredicate("content_type", "=", "Note");
let predicates = [contentTypePredicate, tag.content.predicate];
const contentTypePredicate = new SFPredicate("content_type", "=", "Note");
const predicates = [contentTypePredicate, tag.content.predicate];
if(!tag.content.isTrashTag) {
let notTrashedPredicate = new SFPredicate("content.trashed", "=", false);
const notTrashedPredicate = new SFPredicate("content.trashed", "=", false);
predicates.push(notTrashedPredicate);
}
let results = this.itemsMatchingPredicates(predicates);
const results = this.itemsMatchingPredicates(predicates);
return results;
}
@@ -126,8 +126,8 @@ export class ModelManager extends SFModelManager {
}
emptyTrash() {
let notes = this.trashedItems();
for(let note of notes) {
const notes = this.trashedItems();
for(const note of notes) {
this.setItemToBeDeleted(note);
}
}
@@ -141,7 +141,7 @@ export class ModelManager extends SFModelManager {
}
getSmartTags() {
let userTags = this.validItemsForContentType("SN|SmartTag").sort((a, b) => {
const userTags = this.validItemsForContentType("SN|SmartTag").sort((a, b) => {
return a.content.title < b.content.title ? -1 : 1;
});
return this.systemSmartTags.concat(userTags);