Commit d0eb6cf
refactor(charts): remove useless conditional in onDataPointClickInternal (#8550)
To fix this, remove the duplicated `payload` operand in the `if` guard
inside `onDataPointClickInternal`.
The best minimal, behavior-preserving fix is:
- Keep the null/truthy guard for `payload`.
- Keep the function-type guard for `onDataPointClick`.
- Delete only the duplicated `payload &&`.
This change should be made in
`packages/charts/src/components/PieChart/index.tsx` at the
`onDataPointClickInternal` callback (around line 180 in the snippet). No
imports, new methods, or additional definitions are required.
_Suggested fixes powered by Copilot Autofix. Review carefully before
merging._
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>1 parent bfcd11a commit d0eb6cf
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| |||
0 commit comments