correctly handle 0 notes to erase

This commit is contained in:
zadam 2019-11-12 22:26:25 +01:00
parent 44add751b2
commit 86d7e139a4

View file

@ -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();