Skip to content

Commit 23de749

Browse files
committed
Fix formatting error in WithCurrentTask.jsx
1 parent d101399 commit 23de749

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

src/components/HOCs/WithCurrentTask/WithCurrentTask.jsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { connect } from "react-redux";
77
import AsCooperativeWork from "../../../interactions/Task/AsCooperativeWork";
88
import AsMappableBundle from "../../../interactions/TaskBundle/AsMappableBundle";
99
import { fetchChallenge, fetchParentProject } from "../../../services/Challenge/Challenge";
10-
import { fetchProject } from "../../../services/Project/Project";
1110
import { fetchChallengeActions } from "../../../services/Challenge/Challenge";
1211
import { CHALLENGE_STATUS_FINISHED } from "../../../services/Challenge/ChallengeStatus/ChallengeStatus";
1312
import AppErrors from "../../../services/Error/AppErrors";
@@ -18,6 +17,7 @@ import {
1817
fetchOSMElementHistory,
1918
fetchOSMUser,
2019
} from "../../../services/OSM/OSM";
20+
import { fetchProject } from "../../../services/Project/Project";
2121
import {
2222
addTaskBundleComment,
2323
addTaskComment,
@@ -143,17 +143,11 @@ export const mapDispatchToProps = (dispatch, ownProps) => {
143143
const loadedTask = normalizedResults.entities.tasks[normalizedResults.result];
144144
const existingChallenge = existingTask?.parent;
145145
// Load the parent challenge if missing or stale
146-
if (
147-
!_isPlainObject(existingChallenge) ||
148-
isStale(existingChallenge, CHALLENGE_STALE)
149-
) {
146+
if (!_isPlainObject(existingChallenge) || isStale(existingChallenge, CHALLENGE_STALE)) {
150147
dispatch(fetchChallenge(loadedTask.parent)).then((normalizedChallengeResults) => {
151148
const existingProject = existingChallenge?.parent;
152149
// Load the parent project if missing or stale
153-
if (
154-
!_isPlainObject(existingProject) ||
155-
isStale(existingProject, PROJECT_STALE)
156-
) {
150+
if (!_isPlainObject(existingProject) || isStale(existingProject, PROJECT_STALE)) {
157151
fetchParentProject(dispatch, normalizedChallengeResults);
158152
}
159153
});

0 commit comments

Comments
 (0)