mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	fix not updating attribute if not needed
This commit is contained in:
		
							parent
							
								
									7ec20f9384
								
							
						
					
					
						commit
						674172f0b8
					
				@ -125,11 +125,13 @@ function updateNoteAttributes(req) {
 | 
			
		||||
    for (const incAttr of incomingAttributes) {
 | 
			
		||||
        position += 10;
 | 
			
		||||
 | 
			
		||||
        const value = incAttr.value || "";
 | 
			
		||||
 | 
			
		||||
        const perfectMatchAttr = existingAttrs.find(attr =>
 | 
			
		||||
            attr.type === incAttr.type &&
 | 
			
		||||
            attr.name === incAttr.name &&
 | 
			
		||||
            attr.isInheritable === incAttr.isInheritable &&
 | 
			
		||||
            attr.value === incAttr.value);
 | 
			
		||||
            attr.value === value);
 | 
			
		||||
 | 
			
		||||
        if (perfectMatchAttr) {
 | 
			
		||||
            existingAttrs = existingAttrs.filter(attr => attr.attributeId !== perfectMatchAttr.attributeId);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user