1 import { Component } from "inferno";
2 import { ErrorPageData, setIsoData } from "../../utils";
3 import { ErrorPage } from "../app/error-page";
5 class ErrorGuard extends Component<any, any> {
6 private isoData = setIsoData(this.context);
8 constructor(props: any, context: any) {
13 const errorPageData = this.isoData.routeData[0] as
16 const siteRes = this.isoData.site_res;
18 if (errorPageData?.type === "error" || !siteRes) {
21 return this.props.children;
26 export default ErrorGuard;