mirror of
https://github.com/zadam/trilium.git
synced 2025-11-17 10:40:41 +01:00
many small issues found by intellij analysis
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user