Skip to content

Commit

Permalink
adhere to style guide CI/CD feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Potter committed Jan 11, 2024
1 parent afcbcc2 commit 635e5ee
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/traces/sankey/plot.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,24 @@ function nodeNonHoveredStyle(sankeyNode, d, sankey) {
}

function linkHoveredStyle(d, sankey, visitNodes, sankeyLink) {
if (!linkStyleInitialized) {
if(!linkStyleInitialized) {
// Figure out whether the user has provided their own sankey-link-hover style.
var styleExists = false;
for (var i=0; i<document.styleSheets.length; i++) {
for(var i = 0; i < document.styleSheets.length; i++) {
var rules = document.styleSheets[i].cssRules;
for (var j=0; j < rules.length; j++) {
if (rules[j].selectorText === '.sankey-link-hover') {
for(var j = 0; j < rules.length; j++) {
if(rules[j].selectorText === '.sankey-link-hover') {
styleExists = true;
break;
}
}
if (styleExists) break;
if(styleExists) break;
}

// If not, insert a default one
if (!styleExists) {
if(!styleExists) {
var style = document.querySelector('style');
if (!style) {
if(!style) {
style = document.createElement('style');
document.head.appendChild(style);
}
Expand Down

0 comments on commit 635e5ee

Please sign in to comment.