diff --git a/doc/_static/js/ceph.js b/doc/_static/js/ceph.js index e8114f0165d..5374029a0a3 100644 --- a/doc/_static/js/ceph.js +++ b/doc/_static/js/ceph.js @@ -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(); } });