diff --git a/src/main/events/library/update-game-custom-assets.ts b/src/main/events/library/update-game-custom-assets.ts index 6049ef5d..6e504e92 100644 --- a/src/main/events/library/update-game-custom-assets.ts +++ b/src/main/events/library/update-game-custom-assets.ts @@ -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); diff --git a/src/renderer/src/components/sidebar/sidebar-adding-custom-game-modal.tsx b/src/renderer/src/components/sidebar/sidebar-adding-custom-game-modal.tsx index 4b18a211..7eb8fe32 100644 --- a/src/renderer/src/components/sidebar/sidebar-adding-custom-game-modal.tsx +++ b/src/renderer/src/components/sidebar/sidebar-adding-custom-game-modal.tsx @@ -17,10 +17,10 @@ export interface SidebarAddingCustomGameModalProps { onClose: () => void; } -export function SidebarAddingCustomGameModal({ +export function SidebarAddingCustomGameModal ({ visible, onClose, -}: SidebarAddingCustomGameModalProps) { +}: Readonly) { const { t } = useTranslation("sidebar"); const { updateLibrary } = useLibrary(); const { showSuccessToast, showErrorToast } = useToast(); diff --git a/src/renderer/src/pages/game-details/modals/edit-custom-game-modal.tsx b/src/renderer/src/pages/game-details/modals/edit-custom-game-modal.tsx index fd1e850f..b8daf355 100644 --- a/src/renderer/src/pages/game-details/modals/edit-custom-game-modal.tsx +++ b/src/renderer/src/pages/game-details/modals/edit-custom-game-modal.tsx @@ -20,7 +20,7 @@ export function EditCustomGameModal({ onClose, game, onGameUpdated, -}: EditCustomGameModalProps) { +}: Readonly) { const { t } = useTranslation("sidebar"); const { showSuccessToast, showErrorToast } = useToast();