mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
error handling
This commit is contained in:
parent
ddf8438b22
commit
208baa56e9
@ -193,6 +193,10 @@ function getNoteTypeClass(type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getMimeTypeClass(mime) {
|
function getMimeTypeClass(mime) {
|
||||||
|
if (!mime) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
const semicolonIdx = mime.indexOf(';');
|
const semicolonIdx = mime.indexOf(';');
|
||||||
|
|
||||||
if (semicolonIdx !== -1) {
|
if (semicolonIdx !== -1) {
|
||||||
|
@ -238,7 +238,15 @@ async function findSimilarNotes(noteId) {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
const dateLimits = buildDateLimits(baseNote);
|
let dateLimits;
|
||||||
|
|
||||||
|
try {
|
||||||
|
dateLimits = buildDateLimits(baseNote);
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
throw new Error(`Date limits failed with ${e.message}, entity: ${JSON.stringify(baseNote.pojo)}`);
|
||||||
|
}
|
||||||
|
|
||||||
const rewardMap = buildRewardMap(baseNote);
|
const rewardMap = buildRewardMap(baseNote);
|
||||||
let ancestorRewardCache = {};
|
let ancestorRewardCache = {};
|
||||||
const ancestorNoteIds = new Set(baseNote.ancestors.map(note => note.noteId));
|
const ancestorNoteIds = new Set(baseNote.ancestors.map(note => note.noteId));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user