how did this ever happen

This commit is contained in:
AAGaming
2023-02-22 22:03:19 -05:00
parent 97bb3fa4c8
commit f9624a0859
2 changed files with 1 additions and 10 deletions
-9
View File
@@ -1,9 +0,0 @@
import { getFocusNavController } from '../../../../lib/dist';
export function findSP(): Window {
// old (SP as host)
if (document.title == 'SP') return window;
// new (SP as popup)
return getFocusNavController().m_ActiveContext.m_rgGamepadNavigationTrees.find((x: any) => x.m_ID == 'root_1_').Root
.Element.ownerDocument.defaultView;
}