From 8eacf59fda6eeaf6aa13d5970fe26d4eb754bd7a Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Tue, 23 Jan 2024 23:48:26 +0700 Subject: [PATCH] UBERF-5042: Fix exception in list view (#4419) Signed-off-by: Andrey Sobolev --- .../src/components/list/ListCategories.svelte | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/view-resources/src/components/list/ListCategories.svelte b/plugins/view-resources/src/components/list/ListCategories.svelte index a8b1ac8519..ab5a71ae64 100644 --- a/plugins/view-resources/src/components/list/ListCategories.svelte +++ b/plugins/view-resources/src/components/list/ListCategories.svelte @@ -227,11 +227,17 @@ if (offset === -2 || offset === 2) { if (level + 1 >= viewOptions.groupBy.length) { if (offset === -2) { + if (listListCategory?.[0] == null) { + return + } const obj = listListCategory[0].getLimited()[0] listListCategory[0].expand() select(0, obj) return } else { + if (listListCategory?.[0] == null) { + return + } const g = listListCategory[categories.length - 1].getLimited() listListCategory[categories.length - 1].expand() const obj = g[g.length - 1]