dolphindb 2.0.967 → 2.0.968

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/index.js CHANGED
@@ -1031,8 +1031,10 @@ class DdbObj {
1031
1031
  case DdbType.decimal64:
1032
1032
  case DdbType.decimal128:
1033
1033
  const x = data[acc_len + i];
1034
- if (is_decimal_null_value(type_, x))
1035
- return '';
1034
+ if (is_decimal_null_value(type_, x)) {
1035
+ items[i] = '';
1036
+ break;
1037
+ }
1036
1038
  const { scale } = this.value;
1037
1039
  const s = String(x < 0 ? -x : x).padStart(scale, '0');
1038
1040
  const str = (x < 0 ? '-' : '') + (scale ? `${s.slice(0, -scale) || '0'}.${s.slice(-scale)}` : s);
@@ -1461,8 +1463,10 @@ export function formati(obj, index, options = {}) {
1461
1463
  case DdbType.decimal64:
1462
1464
  case DdbType.decimal128:
1463
1465
  const x = data[acc_len + i];
1464
- if (is_decimal_null_value(type_, x))
1465
- return '';
1466
+ if (is_decimal_null_value(type_, x)) {
1467
+ items[i] = '';
1468
+ break;
1469
+ }
1466
1470
  const { scale } = obj.value;
1467
1471
  const s = String(x < 0 ? -x : x).padStart(scale, '0');
1468
1472
  const str = (x < 0 ? '-' : '') + (scale ? `${s.slice(0, -scale) || '0'}.${s.slice(-scale)}` : s);