fix(handler): update default sort retrieval logic

This commit is contained in:
Hein
2026-07-29 10:23:08 +02:00
parent ef28959c4d
commit feed018408
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ func (h *Handler) getDefaultSort(schema, name string) []common.SortOption {
if h.defaultSort == nil {
return nil
}
if sort, ok := h.defaultSort[defaultSortKey(schema, name)]; ok {
if sort := h.defaultSort[defaultSortKey(schema, name)]; len(sort) > 0 {
return sort
}
return h.defaultSort[defaultSortKey("", "")]
+1 -1
View File
@@ -82,7 +82,7 @@ func (h *Handler) getDefaultSort(schema, name string) []common.SortOption {
if h.defaultSort == nil {
return nil
}
if sort, ok := h.defaultSort[defaultSortKey(schema, name)]; ok {
if sort := h.defaultSort[defaultSortKey(schema, name)]; len(sort) > 0 {
return sort
}
return h.defaultSort[defaultSortKey("", "")]