code refactor

This commit is contained in:
MaysWind
2025-01-06 21:49:49 +08:00
parent 5e7e3696bf
commit 6365805715
+1 -1
View File
@@ -273,7 +273,7 @@ export function getFirstVisibleItem<T>(items: Record<string, T>[] | Record<strin
return null; return null;
} }
export function getItemByKeyValue <T>(src: Record<string, T>[] | Record<string, Record<string, T>>, value: T, keyField: string): Record<string, T> | null { export function getItemByKeyValue<T>(src: Record<string, T>[] | Record<string, Record<string, T>>, value: T, keyField: string): Record<string, T> | null {
if (isArray(src)) { if (isArray(src)) {
const arr = src as Record<string, T>[]; const arr = src as Record<string, T>[];