-
Notifications
You must be signed in to change notification settings - Fork 14
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
Issue with React deployments - Segments does not support... #107
Comments
Hello @mmontesinoademero, thanks for reporting this, we will address the issue as soon as possible :) |
If I remember correctly we had a typescript issue when using :
|
@mmontesinoademero The root cause for this issue is well detailed here : https://www.dannyguo.com/blog/how-to-fix-instanceof-not-working-for-custom-errors-in-typescript The
This seems to be an issue if when the compilation target is ES3 or ES5, but the wierd thing is that the configured target we have is ESNEXT. "Storybook" relies on Babel and does not account apparently for that config. TL;DR |
@mmontesinoademero A new version |
Everything works great in development, but when deploying my React app, the app is throwing the error "Segments does not support non ordinal color scale" due to the deployed eazychart.esm.js, specifically the call to...
if("ScaleOrdinal"===a.constructor.name)
...which corresponds to line 35 at ez-react/src/components/Segments.tsx.
If I change this to...
a instanceof ScaleOrdinal (eazychart.esm.js)
or
colorScale instanceof ScaleOrdinal (Segments.tsx)
...then everything works as expected. I've not yet dug into see if this is related to my own Babel/Webpack configuration. I've been using the same deployment scripts for many years and never seen anything like this.
The text was updated successfully, but these errors were encountered: