Skip to content

Commit 06e8140

Browse files
committed
skip over non-object buttons and button w/o 'args'
1 parent a1265a9 commit 06e8140

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/components/updatemenus/defaults.js

+4
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ function buttonsDefaults(menuIn, menuOut) {
7272
buttonIn = buttonsIn[i];
7373
buttonOut = {};
7474

75+
if(!Lib.isPlainObject(buttonIn) || !Array.isArray(buttonIn.args)) {
76+
continue;
77+
}
78+
7579
// Should we do some validation for 'args' depending on `method`
7680
// or just let Plotly[method] error out?
7781

0 commit comments

Comments
 (0)