Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: invert trash cleanup check to remove items after 7 days

thecodrrec33eb862f71
diff --git a/packages/core/collections/trash.js b/packages/core/collections/trash.js
index 3f8b660fd..8aca5e8ec 100644
--- a/packages/core/collections/trash.js
+++ b/packages/core/collections/trash.js
@@ -21,7 +21,7 @@ export default class Trash {
async cleanup() {
const now = dayjs().unix();
for (const item of this.all) {
- if (dayjs(item.dateDeleted).add(7, "days").unix() < now) continue;
+ if (dayjs(item.dateDeleted).add(7, "days").unix() > now) continue;
await this.delete(item.id);
}
}