Fixed XLSX export for empty comments.
This commit is contained in:
parent
2bdba5ac8e
commit
1347c1fb64
@ -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,6 +152,7 @@ export class MotionXlsxExportService {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
if (comments) {
|
||||||
data.push(
|
data.push(
|
||||||
...comments.map(commentId => {
|
...comments.map(commentId => {
|
||||||
const section = this.commentRepo.getViewModel(commentId);
|
const section = this.commentRepo.getViewModel(commentId);
|
||||||
@ -157,6 +162,7 @@ export class MotionXlsxExportService {
|
|||||||
: '';
|
: '';
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user