officeparser 4.0.6 → 4.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/officeParser.js +1 -2
  2. package/package.json +1 -1
package/officeParser.js CHANGED
@@ -234,8 +234,7 @@ function parseExcel(filepath, callback, config) {
234
234
  const sharedStringsXmlTNodesList = parseString(xmlContentFilesObject.sharedStringsFile).getElementsByTagName("t");
235
235
  /** Create shared string array. This will be used as a map to get strings from within sheet files. */
236
236
  const sharedStrings = Array.from(sharedStringsXmlTNodesList)
237
- .filter(tNode => tNode.childNodes[0] && tNode.childNodes[0].nodeValue)
238
- .map(tNode => tNode.childNodes[0].nodeValue);
237
+ .map(tNode => tNode.childNodes[0]?.nodeValue ?? '');
239
238
 
240
239
  // Parse Sheet files
241
240
  xmlContentFilesObject.sheetFiles.forEach(sheetXmlContent => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "officeparser",
3
- "version": "4.0.6",
3
+ "version": "4.0.7",
4
4
  "description": "A Node.js library to parse text out of any office file. Currently supports docx, pptx, xlsx, odt, odp, ods, pdf files.",
5
5
  "main": "officeParser.js",
6
6
  "files": [