From 0a735886c9d3e91a7e8140f05a3d309ff8ed17b1 Mon Sep 17 00:00:00 2001
From: AAGaming <aa@mail.catvibers.me>
Date: Sun, 14 Aug 2022 21:59:55 -0400
Subject: fix toasts breaking sometimes

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

(limited to 'frontend/src/toaster.tsx')

diff --git a/frontend/src/toaster.tsx b/frontend/src/toaster.tsx
index 7980faef..04f1556e 100644
--- a/frontend/src/toaster.tsx
+++ b/frontend/src/toaster.tsx
@@ -35,7 +35,7 @@ class Toaster extends Logger {
     while (true) {
       instance = findInReactTree(
         (document.getElementById('root') as any)._reactRootContainer._internalRoot.current,
-        (x) => x?.memoizedProps?.className?.startsWith('toastmanager_ToastPlaceholder'),
+        (x) => x?.memoizedProps?.className?.startsWith?.('toastmanager_ToastPlaceholder'),
       );
       if (instance) break;
       this.debug('finding instance');
-- 
cgit v1.2.3

