Skip to content

Commit

Permalink
fix(boxplot): simplify _hasEncodeRule logic (#20324)
Browse files Browse the repository at this point in the history
  • Loading branch information
plainheart committed Dec 3, 2024
1 parent 828c037 commit b0a6c0e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/chart/helper/whiskerBoxCommon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ class WhiskerBoxCommonMixin<Opts extends CommonOption> {
*/
_hasEncodeRule(key: string) {
const encodeRules = this.getEncode();
if (encodeRules && encodeRules.data && encodeRules.data.has(key)) {
return encodeRules.data.get(key) != null;
}
return false;
return encodeRules && encodeRules.get(key) != null;
}

/**
Expand Down

0 comments on commit b0a6c0e

Please sign in to comment.