Skip to content

Commit

Permalink
Merge pull request #38 from advanced-rest-client/fix/W-13798870/delet…
Browse files Browse the repository at this point in the history
…e-cookies

Fix/w-13798870/delete-cookies
  • Loading branch information
leandrogilcarrano authored Sep 25, 2023
2 parents 2b88a5c + aea2792 commit f4c2eb5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@api-components/api-request",
"description": "A set of composite components that are used to build an HTTP request editor with the support of the AMF model.",
"version": "0.3.5",
"version": "0.3.6",
"license": "Apache-2.0",
"main": "index.js",
"module": "index.js",
Expand Down
8 changes: 5 additions & 3 deletions src/XhrSimpleRequestTransportElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,11 @@ export class XhrSimpleRequestTransportElement extends LitElement {
_deleteRequestCookies(options) {
if (options?.auth?.length > 0) {
for (let i = 0; i < options?.auth?.length; i += 1) {
Object.keys(options?.auth[i]?.config?.cookies).forEach((item) => {
this._deleteCookie(item);
});
if (options?.auth[i]?.config?.cookies) {
Object.keys(options?.auth[i]?.config?.cookies).forEach((item) => {
this._deleteCookie(item);
});
}
}
}
}
Expand Down

0 comments on commit f4c2eb5

Please sign in to comment.