Skip to content

Commit c7055c9

Browse files
author
Vikas Agarwal
committed
more safe fix to validate phase when there is only one draft phase
1 parent bf57585 commit c7055c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/projects/actions/project.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ export function createProduct(project, productTemplate, phases, timelines) {
284284
startDate = moment(lastMilestone.startDate).hours(0).minutes(0).seconds(0)
285285
.milliseconds(0).add(lastMilestone.duration - 1, 'days').add(1, 'days')
286286
}
287-
} else if (phase.startDate) {
287+
} else if (phase && phase.startDate) {
288288
// if there is no timeline for the phase, calculates the next phase's start date by adding 1 day to the
289289
// end date of last phase, we don't use end date field of milestone because it might not reflect the
290290
// correct end date

0 commit comments

Comments
 (0)