Skip to content

Commit 9a3e45b

Browse files
committed
update Modebar.hasButtons for cases where buttons haven't been drawn yet
1 parent 18e09dc commit 9a3e45b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/components/modebar/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@ proto.updateActiveButton = function(buttonClicked) {
206206
proto.hasButtons = function (buttons) {
207207
var currentButtons = this.buttons;
208208

209+
if(!currentButtons) return false;
210+
209211
if (buttons.length !== currentButtons.length) return false;
210212

211213
for (var i = 0; i < buttons.length; ++i) {

0 commit comments

Comments
 (0)