Skip to content

Commit 47c9cc4

Browse files
committed
Fix JS error
ECMAScript 6 isn't really supported anywhere Closes #20681
1 parent ea6f65c commit 47c9cc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/html/static/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@
708708
var code = $('<code>').append(structs[j]);
709709
$.each(code.find('a'), function(idx, a) {
710710
var href = $(a).attr('href');
711-
if (href && !href.startsWith('http')) {
711+
if (href && href.indexOf('http') !== 0) {
712712
$(a).attr('href', rootPath + href);
713713
}
714714
});

0 commit comments

Comments
 (0)