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: 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 {