Skip to content

Commit

Permalink
Make syntax consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
ssciolla committed Apr 10, 2023
1 parent 7dcc764 commit a0a0bc8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions assets/js/Components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,13 @@ class App extends React.Component {
handleIssueSave(newIssue, newReport) {
const oldReport = this.state.report;

const report = {...oldReport, ...newReport};
const report = { ...oldReport, ...newReport };

if (report && Array.isArray(report.issues)) {
// Combine backend issues with frontend issue state
report.issues = report.issues.map((issue) => {
if (issue.id === newIssue.id) return newIssue;
const oldIssue = oldReport.issues.find(oldReportIssue => oldReportIssue.id === issue.id);
const oldIssue = oldReport.issues.find((oldReportIssue) => oldReportIssue.id === issue.id);
return oldIssue !== undefined ? { ...oldIssue, ...issue } : issue;
});
}
Expand Down
2 changes: 1 addition & 1 deletion assets/js/Components/ContentPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class ContentPage extends React.Component {

handleCloseButton = () => {
const newReport = { ...this.props.report };
newReport.issues = newReport.issues.map(issue => {
newReport.issues = newReport.issues.map((issue) => {
issue.recentlyResolved = false;
issue.recentlyUpdated = false;
return issue;
Expand Down

0 comments on commit a0a0bc8

Please sign in to comment.