Skip to content

Commit

Permalink
Fix sonarqube flagged bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tiberiuichim committed Aug 27, 2024
1 parent 273ce2f commit 8c48ff8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/manage/Widgets/DataQueryWidget.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,9 @@ class QuerystringWidget extends Component {
onCreateOption={(key) => {
if (!this.state.indexes) return;
if (!this.state.indexes[key]) {
this.setState({
this.setState((prevState) => ({
indexes: {
...this.state.indexes,
...prevState.indexes,
[key]: {
enabled: true,
group: 'Custom',
Expand All @@ -411,7 +411,7 @@ class QuerystringWidget extends Component {
values: {},
},
},
});
}));
}
onChange(
id,
Expand Down Expand Up @@ -555,9 +555,9 @@ class QuerystringWidget extends Component {
onCreateOption={(key) => {
if (!this.state.indexes) return;
if (!this.state.indexes[key]) {
this.setState({
this.setState((prevState) => ({
indexes: {
...this.state.indexes,
...prevState.indexes,
[key]: {
enabled: true,
group: 'Custom',
Expand All @@ -568,7 +568,7 @@ class QuerystringWidget extends Component {
values: {},
},
},
});
}));
}
onChange(id, [
...(value || []),
Expand Down

0 comments on commit 8c48ff8

Please sign in to comment.