From 43aa0497f448d979b3d84c357db082fd57ae6c68 Mon Sep 17 00:00:00 2001
From: AAGaming <aagaming@riseup.net>
Date: Fri, 11 Oct 2024 14:47:20 -0400
Subject: prevent future issues where toString may not be a function (what)

---
 frontend/src/router-hook.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'frontend/src/router-hook.tsx')

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.');
-- 
cgit v1.2.3

