Merge pull request #4853 from emanuelschuetze/comments-fix
Fixed XLSX export for empty comments.
This commit is contained in:
commit
1c3d60fe39
@ -114,7 +114,11 @@ export class MotionXlsxExportService {
|
|||||||
};
|
};
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
columns.push(...comments.map(commentId => ({ header: this.commentRepo.getViewModel(commentId).getTitle() })));
|
if (comments) {
|
||||||
|
columns.push(
|
||||||
|
...comments.map(commentId => ({ header: this.commentRepo.getViewModel(commentId).getTitle() }))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
worksheet.columns = columns;
|
worksheet.columns = columns;
|
||||||
|
|
||||||
@ -148,15 +152,17 @@ export class MotionXlsxExportService {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
data.push(
|
if (comments) {
|
||||||
...comments.map(commentId => {
|
data.push(
|
||||||
const section = this.commentRepo.getViewModel(commentId);
|
...comments.map(commentId => {
|
||||||
const motionComment = motion.getCommentForSection(section);
|
const section = this.commentRepo.getViewModel(commentId);
|
||||||
return motionComment && motionComment.comment
|
const motionComment = motion.getCommentForSection(section);
|
||||||
? reconvertChars(stripHtmlTags(motionComment.comment))
|
return motionComment && motionComment.comment
|
||||||
: '';
|
? reconvertChars(stripHtmlTags(motionComment.comment))
|
||||||
})
|
: '';
|
||||||
);
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user