Skip to content

Commit

Permalink
fix: contemplate rawJson might be undefined II
Browse files Browse the repository at this point in the history
  • Loading branch information
GPaoloni committed Sep 9, 2024
1 parent 0f1de4b commit 4e2f06a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ export const convertContactToContactDocument = ({
transcript,
twilioWorkerId,
content: JSON.stringify(rawJson),
isDataContact: Object.values(dataCallTypes).includes(rawJson?.callType),
isDataContact:
Boolean(rawJson) && Object.values(dataCallTypes).includes(rawJson.callType),

Check failure on line 72 in hrm-domain/packages/hrm-search-config/convertToIndexDocument.ts

View workflow job for this annotation

GitHub Actions / service-tests

'rawJson' is possibly 'undefined'.

Check failure on line 72 in hrm-domain/packages/hrm-search-config/convertToIndexDocument.ts

View workflow job for this annotation

GitHub Actions / unit-tests

'rawJson' is possibly 'undefined'.
// high_boost_global: '', // highBoostGlobal.join(' '),
// low_boost_global: '', // lowBoostGlobal.join(' '),
};
Expand Down

0 comments on commit 4e2f06a

Please sign in to comment.