From cb7e438cd20a88a121a67febf7788c2810702290 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Wed, 27 Dec 2023 09:44:05 +0500 Subject: [PATCH] web: fix crash when sorting tags --- apps/web/src/components/group-header/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/group-header/index.tsx b/apps/web/src/components/group-header/index.tsx index e2ebb92fb..7030a0716 100644 --- a/apps/web/src/components/group-header/index.tsx +++ b/apps/web/src/components/group-header/index.tsx @@ -182,7 +182,10 @@ async function changeGroupOptions( if (options.parentKey === "groupBy") { if (item.key === "abc") groupOptions.sortBy = "title"; - else groupOptions.sortBy = "dateEdited"; + else + options.groupingKey === "tags" || options.groupingKey === "trash" + ? "dateModified" + : "dateEdited"; } await db.settings.setGroupOptions(options.groupingKey, groupOptions); options.refresh();