Skip to content

Commit

Permalink
fix: use findInReactTree to find correct errorboundary for toaster
Browse files Browse the repository at this point in the history
fixes toaster error on latest beta
  • Loading branch information
AAGaming00 committed Feb 3, 2024
1 parent 6b4a56c commit 7f2caa3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/toaster.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,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;
Expand Down

0 comments on commit 7f2caa3

Please sign in to comment.