Merge pull request #5399 from tsiegleauq/normal-amendments-in-list
Fix error for freely editable amendments
This commit is contained in:
commit
aeb893a8d9
@ -798,7 +798,7 @@ export class MotionRepositoryService extends BaseIsAgendaItemAndListOfSpeakersCo
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return amendment.amendment_paragraphs.map((newText: string, paraNo: number) => {
|
return amendment.amendment_paragraphs?.map((newText: string, paraNo: number) => {
|
||||||
let paragraph: string;
|
let paragraph: string;
|
||||||
let paragraphHasChanges;
|
let paragraphHasChanges;
|
||||||
|
|
||||||
@ -866,7 +866,7 @@ export class MotionRepositoryService extends BaseIsAgendaItemAndListOfSpeakersCo
|
|||||||
}
|
}
|
||||||
|
|
||||||
return amendmentParagraphs
|
return amendmentParagraphs
|
||||||
.map(
|
?.map(
|
||||||
(newText: string, paraNo: number): DiffLinesInParagraph => {
|
(newText: string, paraNo: number): DiffLinesInParagraph => {
|
||||||
if (newText !== null) {
|
if (newText !== null) {
|
||||||
return this.diff.getAmendmentParagraphsLines(
|
return this.diff.getAmendmentParagraphsLines(
|
||||||
@ -937,7 +937,7 @@ export class MotionRepositoryService extends BaseIsAgendaItemAndListOfSpeakersCo
|
|||||||
const changedAmendmentParagraphs = this.applyChangesToAmendment(amendment, lineLength, changeRecos, false);
|
const changedAmendmentParagraphs = this.applyChangesToAmendment(amendment, lineLength, changeRecos, false);
|
||||||
|
|
||||||
return changedAmendmentParagraphs
|
return changedAmendmentParagraphs
|
||||||
.map(
|
?.map(
|
||||||
(newText: string, paraNo: number): ViewMotionAmendedParagraph => {
|
(newText: string, paraNo: number): ViewMotionAmendedParagraph => {
|
||||||
if (newText === null) {
|
if (newText === null) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -134,12 +134,14 @@ export class AmendmentListComponent extends BaseListViewComponent<ViewMotion> im
|
|||||||
*/
|
*/
|
||||||
public getAmendmentSummary(amendment: ViewMotion): string {
|
public getAmendmentSummary(amendment: ViewMotion): string {
|
||||||
const diffLines = amendment.diffLines;
|
const diffLines = amendment.diffLines;
|
||||||
if (diffLines) {
|
if (diffLines.length) {
|
||||||
return diffLines
|
return diffLines
|
||||||
.map(diffLine => {
|
.map(diffLine => {
|
||||||
return this.linenumberingService.stripLineNumbers(diffLine.text);
|
return this.linenumberingService.stripLineNumbers(diffLine.text);
|
||||||
})
|
})
|
||||||
.join('[...]');
|
.join('[...]');
|
||||||
|
} else {
|
||||||
|
return amendment.text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user