Don't show amendment CR-diff-view if no CRs exist

This commit is contained in:
Tobias Hößl 2020-06-07 15:02:35 +02:00
parent bc3b8be78d
commit cadef6d42e
No known key found for this signature in database
GPG Key ID: 1D780C7599C2D2A2

View File

@ -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;
}