@@ -7,7 +7,6 @@ import { connect } from "react-redux";
77import AsCooperativeWork from "../../../interactions/Task/AsCooperativeWork" ;
88import AsMappableBundle from "../../../interactions/TaskBundle/AsMappableBundle" ;
99import { fetchChallenge , fetchParentProject } from "../../../services/Challenge/Challenge" ;
10- import { fetchProject } from "../../../services/Project/Project" ;
1110import { fetchChallengeActions } from "../../../services/Challenge/Challenge" ;
1211import { CHALLENGE_STATUS_FINISHED } from "../../../services/Challenge/ChallengeStatus/ChallengeStatus" ;
1312import 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" ;
2121import {
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