dolphindb 2.0.967 → 2.0.969

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/browser.js CHANGED
@@ -1023,8 +1023,10 @@ class DdbObj {
1023
1023
  case DdbType.decimal64:
1024
1024
  case DdbType.decimal128:
1025
1025
  const x = data[acc_len + i];
1026
- if (is_decimal_null_value(type_, x))
1027
- return '';
1026
+ if (is_decimal_null_value(type_, x)) {
1027
+ items[i] = '';
1028
+ break;
1029
+ }
1028
1030
  const { scale } = this.value;
1029
1031
  const s = String(x < 0 ? -x : x).padStart(scale, '0');
1030
1032
  const str = (x < 0 ? '-' : '') + (scale ? `${s.slice(0, -scale) || '0'}.${s.slice(-scale)}` : s);
@@ -1466,8 +1468,10 @@ export function formati(obj, index, options = {}) {
1466
1468
  case DdbType.decimal64:
1467
1469
  case DdbType.decimal128:
1468
1470
  const x = data[acc_len + i];
1469
- if (is_decimal_null_value(type_, x))
1470
- return '';
1471
+ if (is_decimal_null_value(type_, x)) {
1472
+ items[i] = '';
1473
+ break;
1474
+ }
1471
1475
  const { scale } = obj.value;
1472
1476
  const s = String(x < 0 ? -x : x).padStart(scale, '0');
1473
1477
  const str = (x < 0 ? '-' : '') + (scale ? `${s.slice(0, -scale) || '0'}.${s.slice(-scale)}` : s);