Skip to content

Commit

Permalink
fix: transform
Browse files Browse the repository at this point in the history
  • Loading branch information
lxfu1 committed Jan 9, 2024
1 parent e259732 commit 5a43782
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"ci:version": "pnpm changeset version",
"add:changelog": "pnpm changeset",
"before:release": "pnpm run build",
"release": "pnpm run before:release && pnpm publish --no-git-checks -r --registry=https://registry.npmjs.org --filter @ant-design/*",
"release": "pnpm publish --no-git-checks -r --registry=https://registry.npmjs.org --filter @ant-design/*",
"release:alpha": "pnpm publish --tag alpha --no-git-checks -r --filter @ant-design/*",
"release:beta": "pnpm publish --tag beta --no-git-checks -r --filter @ant-design/*"
},
Expand Down
6 changes: 6 additions & 0 deletions packages/plots/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 2.1.7

`2024-01-09`

- 🐞 修复 `transform` 转换逻辑错误

## 2.1.6

`2024-01-08`
Expand Down
2 changes: 1 addition & 1 deletion packages/plots/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ant-design/plots",
"version": "2.1.6",
"version": "2.1.7",
"description": "G2Plot Statistical chart",
"bugs": {
"url": "https://github.com/ant-design/ant-design-charts/issues"
Expand Down
1 change: 1 addition & 0 deletions packages/plots/src/core/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export {
mergeWith,
memoize,
values,
isUndefined,
} from 'lodash-es';
export { isCompositePlot } from './is-composite-plot';
export { transformOptions } from './transform';
Expand Down
3 changes: 2 additions & 1 deletion packages/plots/src/core/utils/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
mergeWithArrayCoverage,
set,
isObject,
isUndefined,
} from './index';

import type { Adaptor, Options } from '../types';
Expand Down Expand Up @@ -79,7 +80,7 @@ export const transformOptions = (params: Adaptor) => {
*/
Object.keys(TRANSFORM_OPTION_KEY).forEach((key) => {
const transformTarget = TRANSFORM_OPTION_KEY[key];
if (config[key]) {
if (!isUndefined(config[key])) {
if (isObject(transformTarget)) {
const { value, target } = transformTarget;
const transformValue = value(config[key]);
Expand Down

0 comments on commit 5a43782

Please sign in to comment.