From a6dcc4ffd715ff560dcddaa918cb9ec85b31fea9 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Tue, 21 Jan 2025 14:54:39 -0600 Subject: [PATCH] Fix unsafe access of selectedData variable --- test/jasmine/tests/select_test.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/jasmine/tests/select_test.js b/test/jasmine/tests/select_test.js index 3d345c63a3a..e9962d33e59 100644 --- a/test/jasmine/tests/select_test.js +++ b/test/jasmine/tests/select_test.js @@ -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] || [])