From b73f307abe68838ae158ae13ae3d7d3a79fe0f31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sat, 3 Jun 2023 11:14:39 -0400 Subject: [PATCH] fix: filter null nav items --- src/navigation/admin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/navigation/admin.js b/src/navigation/admin.js index a620defa3e..df8241c8ba 100644 --- a/src/navigation/admin.js +++ b/src/navigation/admin.js @@ -65,7 +65,7 @@ admin.get = async function () { } const ids = await db.getSortedSetRange('navigation:enabled', 0, -1); const data = await db.getObjects(ids.map(id => `navigation:enabled:${id}`)); - cache = data.map((item) => { + cache = data.filter(Boolean).map((item) => { if (item.hasOwnProperty('groups')) { try { item.groups = JSON.parse(item.groups);