From bb41634991fe81e0bde73c1e5ddf2541bec69cff Mon Sep 17 00:00:00 2001 From: Volpeon Date: Tue, 19 Oct 2021 20:49:43 +0200 Subject: Fix db --- src/services/postDatabase.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/services') diff --git a/src/services/postDatabase.ts b/src/services/postDatabase.ts index ab5db28..63227a2 100644 --- a/src/services/postDatabase.ts +++ b/src/services/postDatabase.ts @@ -38,7 +38,7 @@ export class PostDatabase { const entries = t.array(PostDatabaseEntryC).decode(fileContent); if (f.either.isRight(entries)) { - this.entries = this.max ? entries.right.slice(0, -1 * this.max) : entries.right; + this.entries = this.max ? entries.right.slice(-1 * this.max) : entries.right; } } -- cgit v1.2.3-70-g09d2