summaryrefslogtreecommitdiff
path: root/frontend/ErrorBoundary.ts
blob: a19ad7884fbde6acd1149e57759b5ecc38725b51 (plain)
1
2
3
4
5
6
import { FC, PropsWithChildren } from "react";
import { findModuleExport } from "../module-system";

export const ErrorBoundary = findModuleExport(
    (e) => e?.prototype?.Reset && e?.prototype?.componentDidCatch && e.prototype?.render?.toString().includes("lastErrorKey"),
) as FC<PropsWithChildren>; // Actually a class but @types/react is broken lol