many small issues found by intellij analysis

This commit is contained in:
zadam
2023-01-15 21:04:17 +01:00
parent be654e7a31
commit f50a9c250a
64 changed files with 119 additions and 113 deletions

View File

@@ -261,7 +261,7 @@ async function findSimilarNotes(noteId) {
let counter = 0;
// when the title is very long then weight of each individual word should be lower
// when the title is very long then weight of each individual word should be lowered
// also pretty important in e.g. long URLs in label values
const lengthPenalization = 1 / Math.pow(text.length, 0.3);
@@ -448,7 +448,7 @@ async function findSimilarNotes(noteId) {
}
/**
* Point of this is to break up long running sync process to avoid blocking
* Point of this is to break up long-running sync process to avoid blocking
* see https://snyk.io/blog/nodejs-how-even-quick-async-functions-can-block-the-event-loop-starve-io/
*/
function setImmediatePromise() {