mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 15:11:31 +08:00 
			
		
		
		
	error handling
This commit is contained in:
		
							parent
							
								
									ddf8438b22
								
							
						
					
					
						commit
						208baa56e9
					
				@ -193,6 +193,10 @@ function getNoteTypeClass(type) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function getMimeTypeClass(mime) {
 | 
			
		||||
    if (!mime) {
 | 
			
		||||
        return "";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    const semicolonIdx = mime.indexOf(';');
 | 
			
		||||
 | 
			
		||||
    if (semicolonIdx !== -1) {
 | 
			
		||||
 | 
			
		||||
@ -238,7 +238,15 @@ async function findSimilarNotes(noteId) {
 | 
			
		||||
        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);
 | 
			
		||||
    let ancestorRewardCache = {};
 | 
			
		||||
    const ancestorNoteIds = new Set(baseNote.ancestors.map(note => note.noteId));
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user