Skip to content

Commit 0932271

Browse files
committed
fix(drip-table): wrap render-html with error-boundary to avoid render failure
1 parent 3659cf1 commit 0932271

File tree

1 file changed

+2
-1
lines changed
  • packages/drip-table/src/drip-table/components/render-html

1 file changed

+2
-1
lines changed

packages/drip-table/src/drip-table/components/render-html/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import React from 'react';
1010

1111
import { DripTableColumnSchema, DripTableRecordTypeBase, SchemaObject } from '@/types';
12+
import ErrorBoundary from '@/components/error-boundary';
1213
import RichText from '@/components/rich-text';
1314

1415
import { DripTableComponentProps } from '../component';
@@ -39,7 +40,7 @@ export default class DTCRenderHTML<RecordType extends DripTableRecordTypeBase> e
3940
<div>{ Object.prototype.toString.call(html) }</div>
4041
);
4142
}
42-
return <RichText html={html || ''} />;
43+
return <ErrorBoundary driver={this.props.driver}><RichText html={html || ''} /></ErrorBoundary>;
4344
} catch (error) {
4445
console.error(error);
4546
}

0 commit comments

Comments
 (0)