Commit ae98cc7
committed
Guard reselect against empty/undefined calcdata entries
reselect runs unconditionally at the end of every redraw sequence
(newPlot / react / relayout / resize). Its helper epmtySplomSelectionBatch
iterates gd.calcdata and dereferences cd[i][0] with no guard, so a transient
empty or undefined calcdata entry throws "Cannot read properties of undefined
(reading '0')" and kills the chart even when no selection exists.
The sibling supplyDefaultsUpdateCalc already guards the same access with
(oldCalcdata[i] || [])[0]; make epmtySplomSelectionBatch and determineSearchTraces
equally defensive by skipping empty/undefined entries.
Add a jasmine spec covering both cases.1 parent c201dd1 commit ae98cc7
2 files changed
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
790 | 790 | | |
791 | 791 | | |
792 | 792 | | |
| 793 | + | |
| 794 | + | |
793 | 795 | | |
794 | 796 | | |
795 | 797 | | |
| |||
1286 | 1288 | | |
1287 | 1289 | | |
1288 | 1290 | | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
1289 | 1295 | | |
1290 | 1296 | | |
1291 | 1297 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
3600 | 3601 | | |
3601 | 3602 | | |
3602 | 3603 | | |
| 3604 | + | |
| 3605 | + | |
| 3606 | + | |
| 3607 | + | |
| 3608 | + | |
| 3609 | + | |
| 3610 | + | |
| 3611 | + | |
| 3612 | + | |
| 3613 | + | |
| 3614 | + | |
| 3615 | + | |
| 3616 | + | |
| 3617 | + | |
| 3618 | + | |
| 3619 | + | |
| 3620 | + | |
| 3621 | + | |
| 3622 | + | |
| 3623 | + | |
| 3624 | + | |
| 3625 | + | |
| 3626 | + | |
| 3627 | + | |
| 3628 | + | |
| 3629 | + | |
| 3630 | + | |
| 3631 | + | |
| 3632 | + | |
3603 | 3633 | | |
3604 | 3634 | | |
3605 | 3635 | | |
| |||
0 commit comments