rollup merge of #19453: pshc/rustdoc-check-a-href

Fixes the JS error in #18354 at least. I don't know if there's a more underlying issue that needs addressing.
This commit is contained in:
Corey Richardson 2014-12-05 10:06:58 -08:00
commit ea8bb5d18d

View file

@ -707,8 +707,8 @@
var code = $('<code>').append(structs[j]);
$.each(code.find('a'), function(idx, a) {
var href = $(a).attr('href');
if (!href.startsWith('http')) {
$(a).attr('href', rootPath + $(a).attr('href'));
if (href && !href.startsWith('http')) {
$(a).attr('href', rootPath + href);
}
});
var li = $('<li>').append(code);