fixed assertions + use ?? operators

This commit is contained in:
Moyasee
2025-09-19 21:16:46 +03:00
parent de70beb01e
commit 607bc6407c
2 changed files with 26 additions and 20 deletions

View File

@@ -21,9 +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 !== undefined && { customIconUrl }),
...(customLogoImageUrl !== undefined && { customLogoImageUrl }),
...(customHeroImageUrl !== undefined && { customHeroImageUrl }),
};
await gamesSublevel.put(gameKey, updatedGame);