diff options
| author | Michael Williamson <mike@zwobble.org> | 2025-09-09 09:52:57 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2025-09-09 09:52:57 +0100 |
| commit | 116d0ed94023ec83f5fb42548f1df2dafc4e3ffc (patch) | |
| tree | 86c454fdb39e4b632fdd4d5c3986d63500c02fb9 /lib/docx | |
| parent | 8ca702caace290b532b8e83b44900ff24aca17ff (diff) | |
Use transforms.getDescendantsOfType for safer vmerge removal
Diffstat (limited to 'lib/docx')
| -rw-r--r-- | lib/docx/body-reader.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/docx/body-reader.js b/lib/docx/body-reader.js index b3aea00..5cdb4ef 100644 --- a/lib/docx/body-reader.js +++ b/lib/docx/body-reader.js @@ -567,7 +567,8 @@ function BodyReader(options) { function removeVMergeProperties(rows) { rows.forEach(function(row) { - row.children.forEach(function(cell) { + var cells = transforms.getDescendantsOfType(row, documents.types.tableCell); + cells.forEach(function(cell) { delete cell._vMerge; }); }); |
