Skip to content

Commit e2cb053

Browse files
committed
refactor: simplify condition
1 parent e453f6a commit e2cb053

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

packages/ws-worker/src/events/step-complete.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,7 @@ export default async function onStepComplete(
4646
response_data = event.state?.webhookResponse;
4747

4848
// validating structure of response & add status if it's a number
49-
if (
50-
response_data &&
51-
response_data.body &&
52-
typeof response_data.body === 'object'
53-
) {
49+
if (typeof response_data?.body === 'object') {
5450
webhook_response = {
5551
...(Number.isInteger(response_data.status)
5652
? { status: response_data.status }

0 commit comments

Comments
 (0)