From a439459b6b39fb90351e38412601f3c6ff30680f Mon Sep 17 00:00:00 2001 From: leandrogilcarrano Date: Mon, 25 Sep 2023 12:13:06 -0300 Subject: [PATCH 1/2] fix: add conditional to validate if has cookies --- src/XhrSimpleRequestTransportElement.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/XhrSimpleRequestTransportElement.js b/src/XhrSimpleRequestTransportElement.js index 9197a9d..4b045f7 100644 --- a/src/XhrSimpleRequestTransportElement.js +++ b/src/XhrSimpleRequestTransportElement.js @@ -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); + }); + } } } } From aea2792f98332331c6160a4287a747692fdabe8e Mon Sep 17 00:00:00 2001 From: leandrogilcarrano Date: Mon, 25 Sep 2023 12:13:21 -0300 Subject: [PATCH 2/2] fix: add conditional to validate if has cookies --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d761436..594cd74 100644 --- a/package.json +++ b/package.json @@ -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",