Commit 220ed32
committed
fix: use continue instead of return in clearStacks loop
In commit 1e296cc, clearStacks was refactored from forEach to
for...of, but the inner `return` (which previously only skipped
the current forEach iteration) now exits the entire function.
This means if any parsed data point lacks _stacks data for the
current dataset (e.g. when two points share x-coordinates and
their _stacks object, or when new points are inserted), the
remaining data points are skipped and their stale stack entries
are never cleared. This causes incorrect stacking when datasets
are reordered.
Fixes #121541 parent a153556 commit 220ed32
File tree
2 files changed
+34
-1
lines changed- src/core
- test/specs
2 files changed
+34
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
952 | 952 | | |
953 | 953 | | |
954 | 954 | | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
955 | 988 | | |
956 | 989 | | |
957 | 990 | | |
| |||
0 commit comments