From 9d0550427989c4d350ef0db1a88fbff4c0e629c4 Mon Sep 17 00:00:00 2001 From: Muffin Date: Mon, 31 Jul 2023 23:50:42 -0500 Subject: [PATCH] Wrap scratch-paint with error boundary --- src/containers/paint-editor-wrapper.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/containers/paint-editor-wrapper.jsx b/src/containers/paint-editor-wrapper.jsx index 6474674008f..809eb90d5a3 100644 --- a/src/containers/paint-editor-wrapper.jsx +++ b/src/containers/paint-editor-wrapper.jsx @@ -4,6 +4,7 @@ import bindAll from 'lodash.bindall'; import VM from 'scratch-vm'; import PaintEditor from '../lib/tw-scratch-paint'; import {inlineSvgFonts} from 'scratch-svg-renderer'; +import ErrorBoundaryHOC from '../lib/error-boundary-hoc.jsx'; import {connect} from 'react-redux'; @@ -101,6 +102,6 @@ const mapStateToProps = (state, {selectedCostumeIndex}) => { }; }; -export default connect( +export default ErrorBoundaryHOC('paint')(connect( mapStateToProps -)(PaintEditorWrapper); +)(PaintEditorWrapper));