Skip to content

Commit 567d7da

Browse files
Fix SummaryField .includes is not a function
- check if row is string before trying .includes.
1 parent 22f1e7b commit 567d7da

File tree

1 file changed

+1
-2
lines changed
  • packages/orchestrator-ui-components/src/components/WfoForms/formFields

1 file changed

+1
-2
lines changed

packages/orchestrator-ui-components/src/components/WfoForms/formFields/SummaryField.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,11 @@ function Summary({
4646
const { headers, labels, columns } = data;
4747

4848
const extraColumnsData = columns.filter((_, index) => index !== 0);
49-
5049
const rows = columns[0].map((row, index) => (
5150
<tr key={index}>
5251
{labels && <td className={`label`}>{labels[index]}</td>}
5352
<td className={`value`}>
54-
{row.includes('<!doctype html>') ? (
53+
{typeof row === 'string' && row.includes('<!doctype html>') ? (
5554
<div
5655
className="emailMessage"
5756
dangerouslySetInnerHTML={{ __html: row }}

0 commit comments

Comments
 (0)