UNPKG

@quillforms/block-editor

Version:
26 lines 505 B
/** * WordPress Dependencies */ import { Component } from 'react'; class BlockEditCrashBoundary extends Component { constructor(props) { super(props); this.state = { hasError: false }; } componentDidCatch(error) { this.props.onError(error); this.setState({ hasError: true }); } render() { if (this.state.hasError) { return null; } return this.props.children; } } export default BlockEditCrashBoundary; //# sourceMappingURL=index.js.map