diff options
| author | AAGaming <aagaming@riseup.net> | 2024-10-11 14:47:20 -0400 |
|---|---|---|
| committer | AAGaming <aagaming@riseup.net> | 2024-10-11 14:47:20 -0400 |
| commit | 43aa0497f448d979b3d84c357db082fd57ae6c68 (patch) | |
| tree | 516368db5aed70df3d805e7c0e9b1fca5f53ac0c /frontend/src | |
| parent | 1781c19c11777e08bb078c7d5859fefef764ee78 (diff) | |
| download | decky-loader-43aa0497f448d979b3d84c357db082fd57ae6c68.tar.gz decky-loader-43aa0497f448d979b3d84c357db082fd57ae6c68.zip | |
prevent future issues where toString may not be a function (what)
Diffstat (limited to 'frontend/src')
| -rw-r--r-- | frontend/src/components/modals/DropdownMultiselect.tsx | 2 | ||||
| -rw-r--r-- | frontend/src/router-hook.tsx | 2 | ||||
| -rw-r--r-- | frontend/src/tabs-hook.tsx | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/frontend/src/components/modals/DropdownMultiselect.tsx b/frontend/src/components/modals/DropdownMultiselect.tsx index 255c6fa0..542898ea 100644 --- a/frontend/src/components/modals/DropdownMultiselect.tsx +++ b/frontend/src/components/modals/DropdownMultiselect.tsx @@ -15,7 +15,7 @@ import { FaChevronDown } from 'react-icons/fa'; // TODO add to dfl const dropDownControlButtonClass = findModuleExport((e: Export) => - e?.toString()?.includes('gamepaddropdown_DropDownControlButton'), + e?.toString?.()?.includes('gamepaddropdown_DropDownControlButton'), ); const DropdownMultiselectItem: FC< diff --git a/frontend/src/router-hook.tsx b/frontend/src/router-hook.tsx index 8cffb738..9612793a 100644 --- a/frontend/src/router-hook.tsx +++ b/frontend/src/router-hook.tsx @@ -135,7 +135,7 @@ class RouterHook extends Logger { private async patchDesktopRouter() { const root = getReactRoot(document.getElementById('root') as any); const findRouterNode = () => - findInReactTree(root, (node) => node?.elementType?.type?.toString()?.includes('bShowDesktopUIContent:')); + findInReactTree(root, (node) => node?.elementType?.type?.toString?.()?.includes('bShowDesktopUIContent:')); let routerNode = findRouterNode(); while (!routerNode) { this.warn('Failed to find Router node, reattempting in 5 seconds.'); diff --git a/frontend/src/tabs-hook.tsx b/frontend/src/tabs-hook.tsx index 493faa6b..a70c6580 100644 --- a/frontend/src/tabs-hook.tsx +++ b/frontend/src/tabs-hook.tsx @@ -41,9 +41,9 @@ class TabsHook extends Logger { init() { // TODO patch the "embedded" renderer in this module too (seems to be for VR? unsure) - const qamModule = findModuleByExport((e) => e?.type?.toString()?.includes('QuickAccessMenuBrowserView')); + const qamModule = findModuleByExport((e) => e?.type?.toString?.()?.includes('QuickAccessMenuBrowserView')); const qamRenderer = Object.values(qamModule).find((e: any) => - e?.type?.toString()?.includes('QuickAccessMenuBrowserView'), + e?.type?.toString?.()?.includes('QuickAccessMenuBrowserView'), ); const patchHandler = createReactTreePatcher( |
