mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
fix: ensure objectId exists before removing game from favorites
This commit is contained in:
parent
21684ef6b1
commit
b74e093ddf
1 changed files with 2 additions and 2 deletions
|
@ -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"));
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue