Skip to content

Commit 708f4b6

Browse files
committed
fix: media query should not throw error when has empty axis, related to #3575
1 parent e07ffb0 commit 708f4b6

File tree

1 file changed

+1
-1
lines changed
  • packages/vchart/src/plugin/chart/media-query/util

1 file changed

+1
-1
lines changed

packages/vchart/src/plugin/chart/media-query/util/filter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export const executeMediaQueryActionFilterType = <T extends Record<string, unkno
130130
const infoList = array(chartSpecInfo.component?.[specKey] ?? []);
131131
array(chartSpec[specKey] ?? []).forEach((componentSpec, i) => {
132132
const specInfo = infoList[i];
133-
if (componentTypes.includes(specInfo.type as ComponentTypeEnum)) {
133+
if (specInfo && componentTypes.includes(specInfo.type as ComponentTypeEnum)) {
134134
result.modelInfo.push({
135135
...specInfo,
136136
spec: componentSpec

0 commit comments

Comments
 (0)