#22: Fix handling for possibly undefined Steam app data

This commit is contained in:
mtkennerly 2023-03-02 02:59:29 +08:00
parent 1ad1642583
commit 6d34984166
No known key found for this signature in database
GPG key ID: E764BE00BE6E6408

View file

@ -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]: {} };
}