From caade569c388c7d03ed711e02e1de7188c11256a Mon Sep 17 00:00:00 2001 From: nirgur Date: Wed, 14 Aug 2024 18:11:38 +0300 Subject: [PATCH] fix: issue 7394 RELEASE (#778) ## Related Issues Fixes https://github.com/descope/etc/issues/7394 --- packages/libs/sdk-mixins/src/mixins/baseStaticUrlMixin.ts | 2 +- packages/libs/sdk-mixins/src/mixins/baseUrlMixin.ts | 2 +- packages/sdks/web-component/test/descope-wc.test.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/libs/sdk-mixins/src/mixins/baseStaticUrlMixin.ts b/packages/libs/sdk-mixins/src/mixins/baseStaticUrlMixin.ts index 23cb6162e..3131bd22d 100644 --- a/packages/libs/sdk-mixins/src/mixins/baseStaticUrlMixin.ts +++ b/packages/libs/sdk-mixins/src/mixins/baseStaticUrlMixin.ts @@ -4,7 +4,7 @@ export const baseStaticUrlMixin = createSingletonMixin( (superclass: T) => { return class BaseStaticUrlMixinClass extends superclass { get baseStaticUrl() { - return this.getAttribute('base-static-url'); + return this.getAttribute('base-static-url') || ''; } }; }, diff --git a/packages/libs/sdk-mixins/src/mixins/baseUrlMixin.ts b/packages/libs/sdk-mixins/src/mixins/baseUrlMixin.ts index cbf996f1b..b57eeb9d0 100644 --- a/packages/libs/sdk-mixins/src/mixins/baseUrlMixin.ts +++ b/packages/libs/sdk-mixins/src/mixins/baseUrlMixin.ts @@ -4,7 +4,7 @@ export const baseUrlMixin = createSingletonMixin( (superclass: T) => { return class BaseUrlMixinClass extends superclass { get baseUrl() { - return this.getAttribute('base-url'); + return this.getAttribute('base-url') || ''; } }; }, diff --git a/packages/sdks/web-component/test/descope-wc.test.ts b/packages/sdks/web-component/test/descope-wc.test.ts index 31721000e..16af936b1 100644 --- a/packages/sdks/web-component/test/descope-wc.test.ts +++ b/packages/sdks/web-component/test/descope-wc.test.ts @@ -56,7 +56,7 @@ const THEME_DEFAULT_FILENAME = `theme.json`; const abTestingKey = getABTestingKey(); const defaultOptionsValues = { - baseUrl: null, + baseUrl: '', deferredRedirect: false, abTestingKey, lastAuth: {},