From 6d34984166d741da51d89f39022b9e94ce3bc5b0 Mon Sep 17 00:00:00 2001 From: mtkennerly Date: Thu, 2 Mar 2023 02:59:29 +0800 Subject: [PATCH] #22: Fix handling for possibly undefined Steam app data --- src/manifest.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/manifest.ts b/src/manifest.ts index 3c4b505f..0a7c03fb 100644 --- a/src/manifest.ts +++ b/src/manifest.ts @@ -90,7 +90,11 @@ function integrateWikiData(game: Game, cache: WikiGameCache[""]): void { game.registry = info.registry; } -function integrateSteamData(game: Game, appInfo: SteamGameCache[""]): void { +function integrateSteamData(game: Game, appInfo: SteamGameCache[""] | undefined): void { + if (appInfo === undefined) { + return; + } + if (appInfo.installDir !== undefined) { game.installDir = { [appInfo.installDir]: {} }; }