Skip to content

Commit

Permalink
Handle empty cookie though this shouldn't happen in reality with gett…
Browse files Browse the repository at this point in the history
…ing named cookie
  • Loading branch information
AutomatedTester committed Mar 9, 2022
1 parent 376474e commit 5a45ace
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/api/expect/cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class ExpectCookie extends BaseExpect {
}
if (result && result.value) {
if (Array.isArray(result.value)) {
this.resultValue = result.value[0].value;
this.resultValue = result.value.length > 0 ? result.value[0].value : null;
} else {
this.resultValue = result.value.value;
}
Expand Down

0 comments on commit 5a45ace

Please sign in to comment.