Skip to content

Commit 08548f3

Browse files
authored
[UI] Fix keys in config file for recent games (#1248)
1 parent f0f319a commit 08548f3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

electron/main.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,9 @@ ipcMain.handle(
746746
logInfo([`launching`, title, game], LogPrefix.Backend)
747747

748748
if (recentGames.length) {
749-
let updatedRecentGames = recentGames.filter((a) => a.appName !== game)
749+
let updatedRecentGames = recentGames.filter(
750+
(a) => a.appName && a.appName !== game
751+
)
750752
if (updatedRecentGames.length > MAX_RECENT_GAMES) {
751753
const newArr = []
752754
for (let i = 0; i <= MAX_RECENT_GAMES; i++) {
@@ -760,7 +762,7 @@ ipcMain.handle(
760762
updatedRecentGames.unshift({ appName: game, title })
761763
configStore.set('games.recent', updatedRecentGames)
762764
} else {
763-
configStore.set('games.recent', [{ game, title: title }])
765+
configStore.set('games.recent', [{ appName: game, title }])
764766
}
765767

766768
if (minimizeOnLaunch) {

0 commit comments

Comments
 (0)