Skip to content

Commit 068c59a

Browse files
Set default return to false in getRequestIntercepted
1 parent 99a3fb8 commit 068c59a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cypress/support/commands/api_commands.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ const setRequestIntercepted = (value) =>
7373
* This flag indicates whether a request matching an intercept pattern was detected.
7474
* @returns {boolean} The current value of the request interception flag
7575
*/
76-
const getRequestIntercepted = () => Cypress.env('wasRequestIntercepted');
76+
const getRequestIntercepted = () =>
77+
Cypress.env('wasRequestIntercepted') || false;
7778

7879
/**
7980
* Custom command to intercept API calls and wait for them to complete.

0 commit comments

Comments
 (0)