Skip to content

Commit 040604a

Browse files
committed
fix: add check for empty target on worksheet-xform reconcile
1 parent 5bed18b commit 040604a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/xlsx/xform/sheet/worksheet-xform.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ class WorkSheetXform extends BaseXform {
458458
// options.merges.reconcile(model.mergeCells, model.rows);
459459
const rels = (model.relationships || []).reduce((h, rel) => {
460460
h[rel.Id] = rel;
461-
if (rel.Type === RelType.Comments) {
461+
if (rel.Type === RelType.Comments && options.comments[rel.Target]) {
462462
model.comments = options.comments[rel.Target].comments;
463463
}
464464
if (rel.Type === RelType.VmlDrawing && model.comments && model.comments.length) {

0 commit comments

Comments
 (0)