Skip to content

Commit

Permalink
Merge pull request #30 from coffee-mug/lucas/fix-check-engagement-tim…
Browse files Browse the repository at this point in the history
…e-exist

engagement time: only send the parameter if non-zero
  • Loading branch information
ad-astra-via authored May 30, 2024
2 parents 66dd735 + 31ae094 commit d0a4518
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/requestBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function getToolRequest(
requestBody['cid'] = cid

//const notTheFirstSession = parseInt(requestBody['_s'] as string) > 1
const engagementDuration = client.get('engagementDuration')
const engagementDuration = parseInt(String(client.get('engagementDuration')), 10) || 0;

Check failure on line 95 in src/requestBuilder.ts

View workflow job for this annotation

GitHub Actions / build-test (20.x)

Replace `·parseInt(String(client.get('engagementDuration')),·10)·||·0;` with `⏎····parseInt(String(client.get('engagementDuration')),·10)·||·0`
if (engagementDuration) {
requestBody._et = engagementDuration
}
Expand Down

0 comments on commit d0a4518

Please sign in to comment.