From a946f3bd5a28d1aac074f9b5961e994bca58e34d Mon Sep 17 00:00:00 2001 From: Moyasee Date: Sun, 12 Oct 2025 22:48:33 +0300 Subject: [PATCH] Fix: extracted ternary operations --- .../src/pages/game-details/modals/edit-game-modal.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/pages/game-details/modals/edit-game-modal.tsx b/src/renderer/src/pages/game-details/modals/edit-game-modal.tsx index 38caa5a0..2d6ae0fe 100644 --- a/src/renderer/src/pages/game-details/modals/edit-game-modal.tsx +++ b/src/renderer/src/pages/game-details/modals/edit-game-modal.tsx @@ -427,21 +427,24 @@ export function EditGameModal({ // Helper function to prepare non-custom game assets const prepareNonCustomGameAssets = () => { + const hasIconPath = assetPaths.icon; const customIconUrl = removedAssets.icon ? null - : assetPaths.icon + : hasIconPath ? `local:${assetPaths.icon}` : null; + const hasLogoPath = assetPaths.logo; const customLogoImageUrl = removedAssets.logo ? null - : assetPaths.logo + : hasLogoPath ? `local:${assetPaths.logo}` : null; + const hasHeroPath = assetPaths.hero; const customHeroImageUrl = removedAssets.hero ? null - : assetPaths.hero + : hasHeroPath ? `local:${assetPaths.hero}` : null;