Skip to content

Commit 0f05881

Browse files
committed
Merge pull request #530 from ropensci/fix/nullSelection
protect against a null key in selection
2 parents 68c12fd + 84eac7a commit 0f05881

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: plotly
22
Title: Create Interactive Web Graphics via 'plotly.js'
3-
Version: 3.4.7
3+
Version: 3.4.8
44
Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"),
55
email = "cpsievert1@gmail.com"),
66
person("Chris", "Parmer", role = c("aut", "cph"),

NEWS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
3.4.8 -- 23 Mar 2016
2+
3+
BUGFIX:
4+
5+
* Safeguard against null fields in selections. See #530.
6+
17
3.4.7 -- 19 Mar 2016
28

39
BUGFIX:

inst/htmlwidgets/plotly.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ HTMLWidgets.widget({
5050
var tr = x.data[pt.curveNumber];
5151
// add on additional trace info, if it exists
5252
attachKey = function(keyName) {
53-
if (tr.hasOwnProperty(keyName)) {
53+
if (tr.hasOwnProperty(keyName) && tr[keyName] !== null) {
5454
if (typeof pt.pointNumber === "number") {
5555
obj[keyName] = tr[keyName][pt.pointNumber];
5656
} else {

0 commit comments

Comments
 (0)