tfose5-xlsx 3.5.5 → 3.5.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.
package/README.md CHANGED
@@ -1 +1 @@
1
- # ![Version](https://img.shields.io/badge/version-3.5.5-green.svg)
1
+ # ![Version](https://img.shields.io/badge/version-3.5.7-green.svg)
@@ -114,7 +114,7 @@ function parseSheet(sheetRows, allOtherSheetRows) {
114
114
  }) : undefined;
115
115
  }
116
116
  else {
117
- fieldValue = r[ci] ? converterFactory.build(type).convert(r[ci], type) : undefined;
117
+ fieldValue = typeof r[ci] == 'undefined' ? undefined : converterFactory.build(type).convert(r[ci], type);
118
118
  }
119
119
  const fieldParts = field.split('.');
120
120
  let obj = memo;
@@ -10,7 +10,7 @@ class ToEnumNoConverter {
10
10
  if (!allTextNo)
11
11
  throw new Error(`${this.constructor.name}: 无效枚举[${type}]`);
12
12
  const no = allTextNo[s];
13
- if (!no)
13
+ if (typeof no == 'undefined')
14
14
  throw new Error(`${this.constructor.name}: 无效枚举文本[${type}][${s}]`);
15
15
  return no;
16
16
  }
package/package.json CHANGED
@@ -24,5 +24,5 @@
24
24
  "test": "mocha -t 30s -r ./node_modules/ts-node/register/index.js --exit",
25
25
  "version": "ts-node script version"
26
26
  },
27
- "version": "3.5.5"
27
+ "version": "3.5.7"
28
28
  }