Skip to content

Commit

Permalink
Account for null target activity in non-conflicting activity in plan …
Browse files Browse the repository at this point in the history
…merge (#388)
  • Loading branch information
duranb authored Feb 14, 2023
1 parent 17e2658 commit 44ae9fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/plan/PlanMergeReview.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@
const { source, target } = conflictingActivity;
return {
receivingPlanDirectives: [...previous.receivingPlanDirectives, target],
receivingPlanDirectives: target
? [...previous.receivingPlanDirectives, target]
: previous.receivingPlanDirectives,
supplyingPlanDirectives: [
...previous.supplyingPlanDirectives,
{
Expand Down
2 changes: 1 addition & 1 deletion src/types/plan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export type PlanMergeNonConflictingActivity = {
change_type: PlanMergeActivityOutcome;
merge_request_id: number;
source: PlanMergeActivityDirective;
target: PlanMergeActivityDirective;
target: PlanMergeActivityDirective | null;
};

export type PlanMergeRequestType = 'incoming' | 'outgoing';
Expand Down

0 comments on commit 44ae9fb

Please sign in to comment.