From 9c5fa7e88d3d70b72c8cdc8d25e052fccea2f8e9 Mon Sep 17 00:00:00 2001 From: thecodrr Date: Mon, 7 Sep 2020 09:45:31 +0500 Subject: [PATCH] fix: auto clear of trash after 7 days We were getting this error: `Cannot read property 'remove' of undefined` --- packages/core/api/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/api/index.js b/packages/core/api/index.js index af8b15a70..603c4b012 100644 --- a/packages/core/api/index.js +++ b/packages/core/api/index.js @@ -54,12 +54,12 @@ class Database { this.tags = await Tags.new(this, "tags"); /** @type {Tags} */ this.colors = await Tags.new(this, "colors"); - /** @type {Trash} */ - this.trash = await Trash.new(this, "trash"); /** @type {Content} */ this.delta = await Content.new(this, "delta", false); /** @type {Content} */ this.text = await Content.new(this, "text", false); + /** @type {Trash} */ + this.trash = await Trash.new(this, "trash"); await this.user.sync(); }