mirror of
https://github.com/hustcc/echarts-for-react.git
synced 2025-12-08 20:16:09 +00:00
add try catch, fixed #128
This commit is contained in:
parent
aaa41db84d
commit
d460685f6e
2
demo/dist/bundle.js
vendored
2
demo/dist/bundle.js
vendored
File diff suppressed because one or more lines are too long
@ -105,7 +105,9 @@ var ReactEcharts = function (_React$Component) {
|
||||
this.bindEvents(this.getEchartsInstance(), this.props.onEvents || []);
|
||||
|
||||
if (!isEqual(prevProps.style, this.props.style) || !isEqual(prevProps.className, this.props.className)) {
|
||||
echartObj.resize();
|
||||
try {
|
||||
echartObj.resize();
|
||||
} catch (_) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "echarts-for-react",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.2",
|
||||
"description": "baidu Echarts(v3.x) components for react",
|
||||
"main": "lib/index.js",
|
||||
"files": [
|
||||
|
||||
@ -31,12 +31,10 @@ export default class ReactEcharts extends React.Component {
|
||||
const echartObj = this.renderEchartDom();
|
||||
this.bindEvents(this.getEchartsInstance(), this.props.onEvents || []);
|
||||
|
||||
if (
|
||||
!isEqual(prevProps.style, this.props.style)
|
||||
||
|
||||
!isEqual(prevProps.className, this.props.className)
|
||||
) {
|
||||
if (!isEqual(prevProps.style, this.props.style) || !isEqual(prevProps.className, this.props.className)) {
|
||||
try {
|
||||
echartObj.resize();
|
||||
} catch (_) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user