t2-mapper/docs/assets/ShapeErrorBoundary-ClcZWdMf.js

1 line
449 B
JavaScript
Raw Normal View History

import{r as e}from"./chunk-DECur_0Z.js";import{r as t}from"./jsx-runtime-BpGWiA-R.js";import{t as n}from"./logger-z_EpIdIa.js";var r=e(t(),1),i=n(`ShapeErrorBoundary`),a=class extends r.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){i.error(`Shape load failed: %s %s`,e.message,t.componentStack)}render(){return this.state.hasError?this.props.fallback:this.props.children}};export{a as t};