mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08:00 
			
		
		
		
	fix(export): maintain same order of attachments
This commit is contained in:
		
							parent
							
								
									bb288c5c68
								
							
						
					
					
						commit
						f86434523e
					
				| @ -182,7 +182,9 @@ async function exportToZip(taskContext: TaskContext, branch: BBranch, format: "h | ||||
|         } | ||||
| 
 | ||||
|         const attachments = note.getAttachments(); | ||||
|         meta.attachments = attachments.map((attachment) => { | ||||
|         meta.attachments = attachments | ||||
|             .toSorted((a, b) => ((a.attachmentId ?? "").localeCompare(b.attachmentId ?? "", "en") ?? 1)) | ||||
|             .map((attachment) => { | ||||
|             const attMeta: AttachmentMeta = { | ||||
|                 attachmentId: attachment.attachmentId, | ||||
|                 title: attachment.title, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran