fix(useQuickAccessVisible): remove invalid prop access (#66)

This commit is contained in:
Lukas Senionis
2022-12-11 22:12:22 +02:00
committed by GitHub
parent 52305987c5
commit 767dc2fcee

View File

@@ -7,7 +7,7 @@ declare global {
function getQuickAccessWindow(): Window | null {
try {
const context = FocusNavController?.m_ActiveContext || FocusNavController?.m_LastActiveContext;
const navTrees = context?.m_ActiveContext?.m_rgGamepadNavigationTrees || FocusNavController?.m_rgGamepadNavigationTrees;
const navTrees = context?.m_rgGamepadNavigationTrees || FocusNavController?.m_rgGamepadNavigationTrees;
return navTrees?.find((tree: any) => tree?.id === "QuickAccess-NA")?.m_Root?.m_element?.ownerDocument.defaultView ?? null;
} catch (error) {
console.error(error);