From 2e226f0f72eebfca66817525cbfe620ebd89818d Mon Sep 17 00:00:00 2001 From: Ammar Ahmed Date: Wed, 1 May 2024 12:26:06 +0500 Subject: [PATCH] mobile: fix cannot read property 'sortDirection' of undefined --- apps/mobile/app/components/sheets/sort/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/mobile/app/components/sheets/sort/index.js b/apps/mobile/app/components/sheets/sort/index.js index 2d7950f41..0e4c9c37a 100644 --- a/apps/mobile/app/components/sheets/sort/index.js +++ b/apps/mobile/app/components/sheets/sort/index.js @@ -50,7 +50,7 @@ const Sort = ({ type, screen }) => { const setOrderBy = async () => { let _groupOptions = { ...groupOptions, - sortDirection: groupOptions.sortDirection === "asc" ? "desc" : "asc" + sortDirection: groupOptions?.sortDirection === "asc" ? "desc" : "asc" }; if (type === "topics") { _groupOptions.groupBy = "none"; @@ -85,7 +85,7 @@ const Sort = ({ type, screen }) => {