Skip to content

Commit

Permalink
chore(ui): Resolve issues detected by sonarcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypfer committed Sep 5, 2024
1 parent 67ee71c commit b56ed1c
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions frontend/src/map/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -378,12 +378,14 @@ abstract class Map<P, S> extends React.Component<P & MapProps, S & MapState > {
}

if (result.openDialog) {
this.setState({
...this.state,

dialogOpen: true,
dialogTitle: result.openDialog.title,
dialogBody: result.openDialog.body
this.setState(prevState => {
return {
...prevState,

dialogOpen: true,
dialogTitle: result.openDialog!.title,
dialogBody: result.openDialog!.body
};
});
}

Expand Down Expand Up @@ -415,12 +417,14 @@ abstract class Map<P, S> extends React.Component<P & MapProps, S & MapState > {
}

if (result.openDialog) {
this.setState({
...this.state,

dialogOpen: true,
dialogTitle: result.openDialog.title,
dialogBody: result.openDialog.body
this.setState(prevState => {
return {
...prevState,

dialogOpen: true,
dialogTitle: result.openDialog!.title,
dialogBody: result.openDialog!.body
};
});
}

Expand Down

0 comments on commit b56ed1c

Please sign in to comment.