Skip to content

Commit

Permalink
Fix unsafe access of selectedData variable
Browse files Browse the repository at this point in the history
  • Loading branch information
marthacryan committed Jan 21, 2025
1 parent c610b60 commit a6dcc4f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/jasmine/tests/select_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1996,7 +1996,10 @@ describe('Test select box and lasso per trace:', function() {

return function(expected) {
var msg = '(call #' + callNumber + ') lasso points ';
var lassoPoints = selectedData.lassoPoints || {};
var lassoPoints = {};
if (selectedData && selectedData.lassoPoints) {
lassoPoints = selectedData.lassoPoints;
}

if(subplot) {
expect(lassoPoints[subplot] || [])
Expand Down

0 comments on commit a6dcc4f

Please sign in to comment.