fix toasts breaking sometimes

This commit is contained in:
AAGaming
2022-08-14 21:59:55 -04:00
parent c9430f5be4
commit 0a735886c9
+1 -1
View File
@@ -35,7 +35,7 @@ class Toaster extends Logger {
while (true) { while (true) {
instance = findInReactTree( instance = findInReactTree(
(document.getElementById('root') as any)._reactRootContainer._internalRoot.current, (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; if (instance) break;
this.debug('finding instance'); this.debug('finding instance');