mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 04:51:31 +08:00 
			
		
		
		
	correctly handle 0 notes to erase
This commit is contained in:
		
							parent
							
								
									44add751b2
								
							
						
					
					
						commit
						86d7e139a4
					
				| @ -450,6 +450,10 @@ async function eraseDeletedNotes() { | |||||||
| 
 | 
 | ||||||
|     const noteIdsToErase = await sql.getColumn("SELECT noteId FROM notes WHERE isDeleted = 1 AND isErased = 0 AND notes.utcDateModified <= ?", [dateUtils.utcDateStr(cutoffDate)]); |     const noteIdsToErase = await sql.getColumn("SELECT noteId FROM notes WHERE isDeleted = 1 AND isErased = 0 AND notes.utcDateModified <= ?", [dateUtils.utcDateStr(cutoffDate)]); | ||||||
| 
 | 
 | ||||||
|  |     if (noteIdsToErase.length === 0) { | ||||||
|  |         return; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     const utcNowDateTime = dateUtils.utcNowDateTime(); |     const utcNowDateTime = dateUtils.utcNowDateTime(); | ||||||
|     const localNowDateTime = dateUtils.localNowDateTime(); |     const localNowDateTime = dateUtils.localNowDateTime(); | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam