From f638cf34d10b6d1b4562c2ff46263ac331bbb50f Mon Sep 17 00:00:00 2001 From: Bogdan Date: Fri, 7 Apr 2023 18:06:43 +0300 Subject: [PATCH] Fixed: (UI) Fix search sorting by empty categories --- frontend/src/Store/Actions/releaseActions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/Store/Actions/releaseActions.js b/frontend/src/Store/Actions/releaseActions.js index 554979af2..336c9add8 100644 --- a/frontend/src/Store/Actions/releaseActions.js +++ b/frontend/src/Store/Actions/releaseActions.js @@ -144,7 +144,7 @@ export const defaultState = { }, category: function(item) { - if (item.categories.length > 0) { + if (item.categories !== undefined && item.categories.length > 0) { const sortedCats = item.categories.filter((cat) => cat.name !== undefined).sort((c) => c.id); const firstCat = sortedCats[0];