fix: use findInReactTree to find correct errorboundary for toaster

fixes toaster error on latest beta
This commit is contained in:
AAGaming
2024-02-03 00:33:00 -05:00
parent f5e902f741
commit e8add28797
+4 -1
View File
@@ -80,7 +80,10 @@ class Toaster extends Logger {
instance = findToasterRoot(tree, 0);
}
this.node = instance.return;
this.rNode = this.node.return;
this.rNode = findInReactTree(
this.node.return.return,
(node) => node?.stateNode && node.type?.InstallErrorReportingStore,
);
let toast: any;
let renderedToast: ReactNode = null;
let innerPatched: any;