Skip to content

Commit 8056cc5

Browse files
committed
When pointNumber is a constant, relay it as such
1 parent 8bc36b9 commit 8056cc5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

inst/htmlwidgets/plotly.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,8 @@ HTMLWidgets.widget({
265265
if (Array.isArray(attr)) {
266266
var ptNums = pt.pointNumber || pt.pointNumbers;
267267
if (typeof ptNums === "number") {
268-
ptNums = [ptNums];
269-
}
270-
if (Array.isArray(ptNums)) {
268+
obj[attrsToAttach[i]] = ptNums;
269+
} else if (Array.isArray(ptNums)) {
271270
obj[attrsToAttach[i]] = ptNums.map(function(i) { return attr[i]; });
272271
}
273272
}

0 commit comments

Comments
 (0)