Skip to content

Commit

Permalink
fix: fix error in crosshair
Browse files Browse the repository at this point in the history
  • Loading branch information
xile611 committed Jan 17, 2025
1 parent 48dfe9a commit c143030
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/vchart/src/component/crosshair/cartesian.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export class CartesianCrossHair<T extends ICartesianCrosshairSpec = ICartesianCr

private _layoutByField(field: string) {
const { cacheInfo, attributes, labelsComp, bandSize, coordKey } = this._stateByField[field];
if ((cacheInfo._isCache && this.enableRemain) || !attributes) {
if (!attributes || !cacheInfo || (cacheInfo._isCache && this.enableRemain)) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/vchart/src/component/crosshair/polar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class PolarCrossHair<T extends IPolarCrosshairSpec = IPolarCrosshairSpec>

private _layoutByField(fieldName: string) {
const { cacheInfo, attributes, crosshairComp, labelsComp, coordKey } = this._stateByField[fieldName];
if (cacheInfo._isCache && this.enableRemain) {
if (!cacheInfo || (cacheInfo._isCache && this.enableRemain)) {
return;
}

Expand Down

0 comments on commit c143030

Please sign in to comment.