From 97bb3fa4c879cf2a517e59b1f7177c9e49e0a692 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Wed, 22 Feb 2023 22:00:23 -0500 Subject: Fix loader on feb 22 2023 beta --- frontend/src/components/modals/filepicker/patches/library.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'frontend/src/components/modals/filepicker/patches/library.ts') diff --git a/frontend/src/components/modals/filepicker/patches/library.ts b/frontend/src/components/modals/filepicker/patches/library.ts index 3abf824b..d398b83d 100644 --- a/frontend/src/components/modals/filepicker/patches/library.ts +++ b/frontend/src/components/modals/filepicker/patches/library.ts @@ -4,13 +4,6 @@ import Logger from '../../../../logger'; const logger = new Logger('LibraryPatch'); -declare global { - interface Window { - SteamClient: any; - appDetailsStore: any; - } -} - let patch: Patch; function rePatch() { @@ -20,7 +13,9 @@ function rePatch() { const details = window.appDetailsStore.GetAppDetails(appid); logger.debug('game details', details); // strShortcutStartDir - const file = await window.DeckyPluginLoader.openFilePicker(details.strShortcutStartDir.replaceAll('"', '')); + const file = await window.DeckyPluginLoader.openFilePicker( + details?.strShortcutStartDir.replaceAll('"', '') || '/', + ); logger.debug('user selected', file); window.SteamClient.Apps.SetShortcutExe(appid, JSON.stringify(file.path)); const pathArr = file.path.split('/'); -- cgit v1.2.3