Skip to content

Commit

Permalink
add isMounted check
Browse files Browse the repository at this point in the history
  • Loading branch information
BionIT committed Jan 29, 2024
1 parent 2c2b0f2 commit bc88268
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export class DataSourcePicker extends React.Component {
}));

dataSourceOptions.push(LocalCluster);

if (!this._isMounted) return;
this.setState({
...this.state,
dataSources: dataSourceOptions,
Expand All @@ -56,6 +58,7 @@ export class DataSourcePicker extends React.Component {
}

onChang(e) {
if (!this._isMounted) return;
this.setState({
selectedOption: e,
});
Expand Down

0 comments on commit bc88268

Please sign in to comment.