UNPKG

@quillforms/block-editor

Version:
33 lines (31 loc) 633 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = require("react"); /** * WordPress Dependencies */ class BlockEditCrashBoundary extends _react.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; } } var _default = exports.default = BlockEditCrashBoundary; //# sourceMappingURL=index.js.map