Undo some typings

This commit is contained in:
Adria Navarro 2025-01-08 15:57:15 +01:00
parent d3ba4b103e
commit 5f82a39517
2 changed files with 3 additions and 3 deletions

View File

@ -324,7 +324,7 @@ export default abstract class DataFetch<
}
// If we don't support sorting, do a client-side sort
if (!this.features.supportsSort && clientSideSorting) {
if (!this.features.supportsSort && clientSideSorting && sortType) {
rows = sort(rows, sortColumn as any, sortOrder, sortType)
}

View File

@ -552,7 +552,7 @@ export function search<T extends Record<string, any>>(
*/
export function runQuery<T extends Record<string, any>>(
docs: T[],
query: SearchFilters | null
query: SearchFilters
): T[] {
if (!docs || !Array.isArray(docs)) {
return []
@ -876,7 +876,7 @@ export function sort<T extends Record<string, any>>(
docs: T[],
sort: keyof T,
sortOrder: SortOrder,
sortType: SortType | null = SortType.STRING
sortType = SortType.STRING
): T[] {
if (!sort || !sortOrder || !sortType) {
return docs