Skip to content

Commit

Permalink
fix(drip-table): wrap render-html with error-boundary to avoid render…
Browse files Browse the repository at this point in the history
… failure
  • Loading branch information
tinymins committed Mar 31, 2022
1 parent 3659cf1 commit 0932271
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import React from 'react';

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

import { DripTableComponentProps } from '../component';
Expand Down Expand Up @@ -39,7 +40,7 @@ export default class DTCRenderHTML<RecordType extends DripTableRecordTypeBase> e
<div>{ Object.prototype.toString.call(html) }</div>
);
}
return <RichText html={html || ''} />;
return <ErrorBoundary driver={this.props.driver}><RichText html={html || ''} /></ErrorBoundary>;
} catch (error) {
console.error(error);
}
Expand Down

0 comments on commit 0932271

Please sign in to comment.