mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-07-30 14:17:39 +00:00
fix(handler): update default sort retrieval logic
This commit is contained in:
@@ -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("", "")]
|
||||
|
||||
@@ -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("", "")]
|
||||
|
||||
Reference in New Issue
Block a user