forked from FoundKeyGang/FoundKey
backend: fix types in getRedisFamily
This commit is contained in:
parent
6df2f7c55c
commit
0db0db9a87
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ function getRedisFamily(family?: string | number): number {
|
||||||
dual: 0,
|
dual: 0,
|
||||||
};
|
};
|
||||||
if (typeof family === 'string' && family in familyMap) {
|
if (typeof family === 'string' && family in familyMap) {
|
||||||
return familyMap[family];
|
return familyMap[family as keyof typeof familyMap];
|
||||||
} else if (typeof family === 'number' && Object.values(familyMap).includes(family)) {
|
} else if (typeof family === 'number' && Object.values(familyMap).includes(family)) {
|
||||||
return family;
|
return family;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue