Skip to content

Commit 53a5a64

Browse files
committed
lookup in _plots instead of indexOf in array of ids
1 parent 4ed586a commit 53a5a64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plots/plots.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ plots.linkSubplots = function(newFullData, newFullLayout, oldFullData, oldFullLa
834834
}
835835
// Then look for a subplot with the counteraxis overlaying the anchor
836836
// If that fails just use the first subplot including this axis
837-
if(!mainSubplotID || ids.indexOf(mainSubplotID) === -1) {
837+
if(!mainSubplotID || !newSubplots[mainSubplotID]) {
838838
mainSubplotID = '';
839839
for(j = 0; j < ids.length; j++) {
840840
id = ids[j];

0 commit comments

Comments
 (0)