Skip to content

Commit f4c2eb5

Browse files
Merge pull request #38 from advanced-rest-client/fix/W-13798870/delete-cookies
Fix/w-13798870/delete-cookies
2 parents 2b88a5c + aea2792 commit f4c2eb5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@api-components/api-request",
33
"description": "A set of composite components that are used to build an HTTP request editor with the support of the AMF model.",
4-
"version": "0.3.5",
4+
"version": "0.3.6",
55
"license": "Apache-2.0",
66
"main": "index.js",
77
"module": "index.js",

src/XhrSimpleRequestTransportElement.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,11 @@ export class XhrSimpleRequestTransportElement extends LitElement {
395395
_deleteRequestCookies(options) {
396396
if (options?.auth?.length > 0) {
397397
for (let i = 0; i < options?.auth?.length; i += 1) {
398-
Object.keys(options?.auth[i]?.config?.cookies).forEach((item) => {
399-
this._deleteCookie(item);
400-
});
398+
if (options?.auth[i]?.config?.cookies) {
399+
Object.keys(options?.auth[i]?.config?.cookies).forEach((item) => {
400+
this._deleteCookie(item);
401+
});
402+
}
401403
}
402404
}
403405
}

0 commit comments

Comments
 (0)