Closed demetrius-mp closed 2 years ago
Fixed with 0.5.6
, please upgrade w/ npm install @kahi-ui/framework@0.5.6
.
Since you can't edit DOM or detect user preferences on server, darkmode
shortcuts to readable(false)
during SSR. Hence why it only worked some of the time for you.
Works fine now! Thanks.
Describe the Bug
I was trying out the components, and when i tried the darkmode store, it was very weird. When i first open the page that is importing
darkmode
, it returns a 505, with the messagereadable is not defined
. Sometimes after a refresh it worked, but it is not always. Also, if i clicked on an anchor tag withhref="#"
, it worked properly. I noticed as well that if i import the darkmode and use its store while the server is running in dev mode, it works just fine, but as soon as i refresh, it returns the same 505 message.Reproduction
i actually created a branch on my repo that reproduces the problem: here. You can check the last commit to see what i added to the code that caused the problem. To see the issue, start the development server, and open
localhost:3000
, it should have a 505 message, but if you click on theSvelte Blogger
heading on the navbar, it should work properly. Notice this is a sveltekit project.System Info
Additional Context
No response