Skip to content

Commit 7ace08a

Browse files
committed
fix: Handle nested request events crash post abort
1 parent 3fb0ebd commit 7ace08a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/runner/nested-request.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function runNestedRequest ({ executionId, isExecutionSkipped, vaultSecrets, item
159159
// For nested requests, the request event should bubble up to the parent.
160160
// This event is merely used for notifying the consumer that a nested request was sent
161161
// similar to pm.sendRequest. So the consumer can work this into logs & any other logic.
162-
if (typeof self.triggers.request === 'function') {
162+
if (typeof self.triggers.request === 'function' && self.state && self.state.nestedRequest) {
163163
self.triggers.request(err, self.state.nestedRequest.rootCursor, ...rest);
164164
}
165165
},

0 commit comments

Comments
 (0)