mirror of
https://github.com/ceph/ceph
synced 2024-12-26 05:25:09 +00:00
doc: do not try to patch #edit-on-github if not found
we add this element in _templates/page.html, which is only used for the content pages, not in the "search" page. to avoid the js errors, just disabled it if it's not found. Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
34b78df480
commit
9d2f6329b7
6
doc/_static/js/ceph.js
vendored
6
doc/_static/js/ceph.js
vendored
@ -33,8 +33,10 @@ $(function() {
|
||||
if (show_edit(branch, data)) {
|
||||
// patch the edit-on-github URL for correct branch
|
||||
var url = $("#edit-on-github").attr("href");
|
||||
url = url.replace("master", branch);
|
||||
$("#edit-on-github").attr("href", url);
|
||||
if (url) {
|
||||
url = url.replace("master", branch);
|
||||
$("#edit-on-github").attr("href", url);
|
||||
}
|
||||
$("#docubetter").show();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user