Skip to content

Commit b59fc82

Browse files
committed
refactor: adjust logic to satisfy code scanners
1 parent 2f0cb7e commit b59fc82

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

etc/typedoc/theme/assets/js/theme.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,11 @@
6161
var idx = txt.indexOf( 'stdlib' );
6262
if ( idx === -1 || idx === 1 ) { // e.g., '@stdlib/types/iter'
6363
txt = 'stdlib | ' + txt;
64-
} else if ( txt.indexOf( ' | stdlib' ) === txt.length-9 ) { // e.g., 'foo/bar | stdlib'
65-
txt = 'stdlib | ' + txt.slice( 0, -9 );
64+
} else {
65+
idx = txt.indexOf( ' | stdlib' );
66+
if ( idx === txt.length-9 ) { // e.g., 'foo/bar | stdlib'
67+
txt = 'stdlib | ' + txt.slice( 0, -9 );
68+
}
6669
}
6770
el.innerHTML = txt;
6871
}

0 commit comments

Comments
 (0)