UBERF-5042: Fix exception in list view (#4419)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2024-01-23 23:48:26 +07:00 committed by GitHub
parent 261cd3b4df
commit 8eacf59fda
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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]