backend: fix types in getRedisFamily

This commit is contained in:
Norm 2022-10-31 18:39:05 -04:00
parent 6df2f7c55c
commit 0db0db9a87
Signed by untrusted user: norm
GPG key ID: 7123E30E441E80DE

View file

@ -10,7 +10,7 @@ function getRedisFamily(family?: string | number): number {
dual: 0,
};
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)) {
return family;
}