mirror of
https://github.com/jcreek/LivingDexTracker.git
synced 2026-09-18 19:42:04 +00:00
fix(*): Address PR comments
This commit is contained in:
@@ -19,10 +19,12 @@ class RegionGameMappingRepository {
|
||||
}
|
||||
|
||||
async update(id: string, data: Partial<RegionGameMapping>): Promise<RegionGameMapping | null> {
|
||||
void id;
|
||||
if (!data.region || !data.game) return null;
|
||||
const normalizedId = Number(id);
|
||||
const resolvedId = Number.isFinite(normalizedId) ? normalizedId : data.id;
|
||||
if (typeof resolvedId !== 'number' || !Number.isFinite(resolvedId)) return null;
|
||||
return {
|
||||
id: data.id,
|
||||
id: resolvedId,
|
||||
region: data.region,
|
||||
game: data.game
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user