From cadef6d42ea690a7b3f49e2cfc057b1b98d279eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Ho=CC=88=C3=9Fl?= Date: Sun, 7 Jun 2020 15:02:35 +0200 Subject: [PATCH] Don't show amendment CR-diff-view if no CRs exist --- .../motion-detail/motion-detail.component.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.ts b/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.ts index bcfd14fc8..f92737a1b 100644 --- a/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.ts @@ -1547,6 +1547,16 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit, * a change reco. The autoupdate has to come "after" this routine */ return ChangeRecoMode.Original; + } else if ( + mode === ChangeRecoMode.Diff && + !this.changeRecommendations?.length && + this.motion?.isParagraphBasedAmendment() + ) { + /** + * The Diff view for paragraph-based amendments is only relevant for change recommendations; + * the regular amendment changes are shown in the "original" view. + */ + return ChangeRecoMode.Original; } return mode; }