From 50230e029768d9923c068e9b81eaf617bff20325 Mon Sep 17 00:00:00 2001 From: Carson Sievert Date: Wed, 23 Mar 2016 09:33:28 +1100 Subject: [PATCH 1/2] protect against a null key in selection --- inst/htmlwidgets/plotly.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/htmlwidgets/plotly.js b/inst/htmlwidgets/plotly.js index e1d4a9de5f..e9a3f90eda 100644 --- a/inst/htmlwidgets/plotly.js +++ b/inst/htmlwidgets/plotly.js @@ -50,7 +50,7 @@ HTMLWidgets.widget({ var tr = x.data[pt.curveNumber]; // add on additional trace info, if it exists attachKey = function(keyName) { - if (tr.hasOwnProperty(keyName)) { + if (tr.hasOwnProperty(keyName) && tr[keyName] !== null) { if (typeof pt.pointNumber === "number") { obj[keyName] = tr[keyName][pt.pointNumber]; } else { From 84eac7a34641d1ac1faa146dcad4a16d69b2a7a2 Mon Sep 17 00:00:00 2001 From: Carson Sievert Date: Wed, 23 Mar 2016 12:26:02 +1100 Subject: [PATCH 2/2] bump version; update news --- DESCRIPTION | 2 +- NEWS | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 30e6b9d6fd..0cc8a1b044 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: plotly Title: Create Interactive Web Graphics via 'plotly.js' -Version: 3.4.7 +Version: 3.4.8 Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"), email = "cpsievert1@gmail.com"), person("Chris", "Parmer", role = c("aut", "cph"), diff --git a/NEWS b/NEWS index 5780565cab..000a3f0f51 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +3.4.8 -- 23 Mar 2016 + +BUGFIX: + +* Safeguard against null fields in selections. See #530. + 3.4.7 -- 19 Mar 2016 BUGFIX: