Skip to content

Commit dc9cc78

Browse files
committed
do a better job of supplying config defaults; fixes #977
1 parent ed0c97e commit dc9cc78

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

inst/htmlwidgets/plotly.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ HTMLWidgets.widget({
143143
}
144144

145145
// remove "sendDataToCloud", unless user has specified they want it
146-
var config = x.config || {};
147-
if (!config.cloud) {
148-
x.config.modeBarButtonsToRemove = config.modeBarButtonsToRemove || [];
146+
x.config = x.config || {};
147+
if (!x.config.cloud) {
148+
x.config.modeBarButtonsToRemove = x.config.modeBarButtonsToRemove || [];
149149
x.config.modeBarButtonsToRemove.push("sendDataToCloud");
150150
}
151151

0 commit comments

Comments
 (0)