diff --git a/ghost/admin/app/components/koenig-lexical-editor-input.js b/ghost/admin/app/components/koenig-lexical-editor-input.js index 950859846c..526b6cd34b 100644 --- a/ghost/admin/app/components/koenig-lexical-editor-input.js +++ b/ghost/admin/app/components/koenig-lexical-editor-input.js @@ -14,6 +14,18 @@ class ErrorHandler extends React.Component { return {hasError: true}; } + componentDidCatch(error) { + if (this.props.config.sentry_dsn) { + Sentry.captureException(error, { + tags: { + lexical: true + } + }); + } + + console.error(error, errorInfo); // eslint-disable-line + } + render() { if (this.state.hasError) { return ( @@ -82,7 +94,7 @@ export default class KoenigLexicalEditorInput extends Component { ReactComponent = (props) => { return (
- + Loading editor...

}> - + Loading editor...

}>