highcharts-react
highcharts-react copied to clipboard
Fix build-demo script in package.json and removing unnecessary codes in HighchartsReact.js
Problem: i)While Running build-demo script in local, it will throw below errors ii)Removing unnecessary codes in HighchartsReact.js
Solution:
i)To avoid above errors, need to change the build-demo script as [ babelify --presets [ @babel/preset-env @babel/preset-react ] ]
instead of [ babelify --presets [ env react ] ]
ii) a) Restructured props.callback ? props.callback : undefined
as props.callback
. if props doesn't have callback, default value will be undefined
b) chartRef.current
removed in else statement. since if statement checked as !chartRef.current, so always chartRef.current
will have value in else statement
Hi @ppotaczek . Can you please review this PR
The problem with build-demo script has been fixed in v3.2.0.