Changed props to be read-only, started using coalescing operator

This commit is contained in:
Moyasee
2025-09-19 17:43:21 +03:00
parent ab163ffa39
commit 04be5c754e
3 changed files with 6 additions and 13 deletions

View File

@@ -21,16 +21,9 @@ const updateGameCustomAssets = async (
const updatedGame = {
...existingGame,
title,
customIconUrl:
customIconUrl !== undefined ? customIconUrl : existingGame.customIconUrl,
customLogoImageUrl:
customLogoImageUrl !== undefined
? customLogoImageUrl
: existingGame.customLogoImageUrl,
customHeroImageUrl:
customHeroImageUrl !== undefined
? customHeroImageUrl
: existingGame.customHeroImageUrl,
customIconUrl: customIconUrl ?? existingGame.customIconUrl,
customLogoImageUrl: customLogoImageUrl ?? existingGame.customLogoImageUrl,
customHeroImageUrl: customHeroImageUrl ?? existingGame.customHeroImageUrl,
};
await gamesSublevel.put(gameKey, updatedGame);