diff options
| author | Corey Richardson <corey@octayn.net> | 2014-12-05 10:06:58 -0800 |
|---|---|---|
| committer | Corey Richardson <corey@octayn.net> | 2014-12-05 10:06:58 -0800 |
| commit | ea8bb5d18d6bfff644631a1692eea1e429566298 (patch) | |
| tree | d80b222221c5b0eeaf128a0dd37a3c0574a13de1 | |
| parent | 7f8f4abc554e0da3c01916f69eb88b21a2a0a078 (diff) | |
| parent | e407472f90247bd23485191b9ecaab89a90326c8 (diff) | |
| download | rust-ea8bb5d18d6bfff644631a1692eea1e429566298.tar.gz rust-ea8bb5d18d6bfff644631a1692eea1e429566298.zip | |
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.
| -rw-r--r-- | src/librustdoc/html/static/main.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 7c6f7ed3fe2..8943d942cef 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -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); |
