Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 808079e

Browse files
committed
do not loop in newly added items
1 parent 08917b5 commit 808079e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/fx/hover.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,8 @@ function _hover(gd, evt, subplot, noHoverEvent, eventTarget) {
271271
var hovermodeHasY = (hovermode || '').charAt(0) === 'y';
272272

273273
if(hoversameaxis && hasCartesian && (hovermodeHasX || hovermodeHasY)) {
274-
for(var p = 0; p < subplots.length; p++) {
274+
var subplotsLength = subplots.length;
275+
for(var p = 0; p < subplotsLength; p++) {
275276
spId = subplots[p];
276277
if(plots[spId]) {
277278
// 'cartesian' case

0 commit comments

Comments
 (0)