Note: I ran into this issue using DropDown, but possibly this is more general.
Context -- I am using Astro + svelte and adding a Flowbite-svelte component. I did a sanity check with a component such as Alert and it worked fine. Here are the versions of packages I am using.
Cannot read properties of undefined (reading 'subscribe')
The error is on the line using activeUrlStore. It is undefined. If I remove the line to subscribe, the page loads.
dropdown/DropdownItem.svelte
const activeUrlStore = getContext('activeUrl');
let sidebarUrl = '';
activeUrlStore.subscribe((value) => { # this is where activeUrlState seems to be undefined
// console.log('value: ', value)
sidebarUrl = value;
});
Describe the bug
Note: I ran into this issue using DropDown, but possibly this is more general.
Context -- I am using Astro + svelte and adding a Flowbite-svelte component. I did a sanity check with a component such as Alert and it worked fine. Here are the versions of packages I am using.
index.astro
Result
The error is on the line using activeUrlStore. It is undefined. If I remove the line to subscribe, the page loads.
dropdown/DropdownItem.svelte
Reproduction
https://stackblitz.com/edit/github-r6snzx
Flowbite version and System Info