diff --git a/src/main/services/library-sync/merge-with-remote-games.ts b/src/main/services/library-sync/merge-with-remote-games.ts index 8790318f..460cad0f 100644 --- a/src/main/services/library-sync/merge-with-remote-games.ts +++ b/src/main/services/library-sync/merge-with-remote-games.ts @@ -19,7 +19,8 @@ export const mergeWithRemoteGames = async () => { if (localGame) { const updatedLastTimePlayed = localGame.lastTimePlayed == null || - new Date(game.lastTimePlayed) > localGame.lastTimePlayed + (game.lastTimePlayed && + new Date(game.lastTimePlayed) > localGame.lastTimePlayed) ? new Date(game.lastTimePlayed) : localGame.lastTimePlayed;