Skip to content

Commit

Permalink
Fix JS error
Browse files Browse the repository at this point in the history
ECMAScript 6 isn't really supported anywhere

Closes #20681
  • Loading branch information
sfackler committed Jan 7, 2015
1 parent ea6f65c commit 47c9cc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/html/static/main.js
Expand Up @@ -708,7 +708,7 @@
var code = $('<code>').append(structs[j]);
$.each(code.find('a'), function(idx, a) {
var href = $(a).attr('href');
if (href && !href.startsWith('http')) {
if (href && href.indexOf('http') !== 0) {
$(a).attr('href', rootPath + href);
}
});
Expand Down

0 comments on commit 47c9cc4

Please sign in to comment.