Skip to content

Commit b4816ab

Browse files
committed
Optional chaining added
1 parent 7d726f7 commit b4816ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ReactFC.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class ReactFC extends React.Component {
3939
componentWillUnmount() {
4040
if (!this.initialUnmount){
4141
this.initialUnmount = true;
42-
const isMapChart = this.props.type && this.props.type.toLowerCase().includes('map');
42+
const isMapChart = this.props.type?.toLowerCase().includes("map");
4343
if(!isMapChart)
4444
this.chartObj.dispose();
4545
}else{

0 commit comments

Comments
 (0)