-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 500 #130
Fix 500 #130
Conversation
needed to enable ssr
Good point. The eslint rules are in |
Hi David, How can I reproduce this issue? Is it only in the docs? |
Hi Luuc, You can reproduce the issue by navigating to site, clicking on the examples tab and refreshing the page. You should see a error like the following - The error appears only on refresh and goes away if you click on the home tab and then on the examples tab. Yes, it is not an issue in the Mark and Layer components because Here's a toy example to better illustrate what is happening - Case 1a: behaviour of
|
Thanks for the extensive illustration @johsi-k! It looks like this is related to a potential bug in Svelte's SSR output. |
After some investigation, we found that in Sapper updating store using
.set()
cause value to be undefined on server side outside reactive block but defined inside reactive block. If we switch to$
and=
assignment (another acceptable syntax by SvelteDoc), the value is defined outside reactive block but undefined inside reactive block.In Florence store value is updated using
.set()
and$interactionManagerContext
is undefined outside reactive block. It caused a fatal error when.set()
is invoked thus the 500 error.This PR resolved this issue by moving
$interactionManagerContext.select()
into function that is only invoked on client side.We suspect this is not a Florence bug but one of the Sapper's quirks. As 500 error is not consistently observed, please try to make sure we all can reproduce the error before merging.
P.S. We need to ensure all our linting is consistent and enabled.