@leankylin-sheet/formula-parser 7.0.38 → 7.0.40
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/dist/index.esm.js +4 -0
- package/dist/index.js +4 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -334,7 +334,11 @@ function func$1() {
|
|
|
334
334
|
}
|
|
335
335
|
|
|
336
336
|
// Date 拼接时取 Excel 序列号,避免出现 "Tue Oct 20 2026 ..." 这类 JS 默认格式
|
|
337
|
+
// 空单元格取到的是 null/undefined,按空字符串拼接,否则 `="FY"&$A$1&"01"` 这类公式会抛 TypeError
|
|
337
338
|
function toString(value) {
|
|
339
|
+
if (value == null) {
|
|
340
|
+
return "";
|
|
341
|
+
}
|
|
338
342
|
return isDate(value) ? String(dateToSerialNumber(value)) : value.toString();
|
|
339
343
|
}
|
|
340
344
|
func$1.SYMBOL = SYMBOL$1;
|
package/dist/index.js
CHANGED
|
@@ -362,7 +362,11 @@ function func$1() {
|
|
|
362
362
|
}
|
|
363
363
|
|
|
364
364
|
// Date 拼接时取 Excel 序列号,避免出现 "Tue Oct 20 2026 ..." 这类 JS 默认格式
|
|
365
|
+
// 空单元格取到的是 null/undefined,按空字符串拼接,否则 `="FY"&$A$1&"01"` 这类公式会抛 TypeError
|
|
365
366
|
function toString(value) {
|
|
367
|
+
if (value == null) {
|
|
368
|
+
return "";
|
|
369
|
+
}
|
|
366
370
|
return isDate(value) ? String(dateToSerialNumber(value)) : value.toString();
|
|
367
371
|
}
|
|
368
372
|
func$1.SYMBOL = SYMBOL$1;
|