diff --git a/src/renderer/src/pages/game-details/hero/hero-panel-actions.tsx b/src/renderer/src/pages/game-details/hero/hero-panel-actions.tsx index 0646b0f4..eee40df8 100644 --- a/src/renderer/src/pages/game-details/hero/hero-panel-actions.tsx +++ b/src/renderer/src/pages/game-details/hero/hero-panel-actions.tsx @@ -61,9 +61,9 @@ export function HeroPanelActions() { setToggleLibraryGameDisabled(true); try { - if (game?.favorite) { + if (game?.favorite && objectId) { await window.electron - .removeGameFromFavorites(shop, objectId!) + .removeGameFromFavorites(shop, objectId) .then(() => { showSuccessToast(t("game_removed_from_favorites")); });