Skip to content

Commit d11f465

Browse files
author
yingying.xwy
committed
test: 🐛 fix tests
1 parent 63be728 commit d11f465

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/s2-core/src/utils/dataset/pivot-data-set.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { set, map, reduce, isUndefined, forEach, last } from 'lodash';
1+
import { set, map, reduce, isUndefined, forEach, last, isNil } from 'lodash';
22
import { DataType } from '@/data-set/interface';
33
import {
44
DataPathParams,
@@ -49,6 +49,10 @@ export function transformDimensionsValues(
4949
sortedDimensionValues[dimension].push(cacheKey);
5050
}
5151

52+
// 保证 undefined 之外的数据都为 string 类型
53+
if (dimensionValue === undefined) {
54+
return dimensionValue;
55+
}
5256
return `${dimensionValue}`;
5357
});
5458
}

0 commit comments

Comments
 (0)