We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e1593a commit 497012dCopy full SHA for 497012d
web_src/js/components/ViewFileTreeStore.ts
@@ -31,6 +31,7 @@ export function createViewFileTreeStore(props: {repoLink: string, treePath: stri
31
const elViewContent = document.querySelector('.repo-view-content');
32
elViewContent.innerHTML = await response.text();
33
const elViewContentData = elViewContent.querySelector('.repo-view-content-data');
34
+ if (!elViewContentData) return; // if error occurs, there is no such element
35
const t1 = elViewContentData.getAttribute('data-document-title');
36
const t2 = elViewContentData.getAttribute('data-document-title-common');
37
document.title = `${t1} - ${t2}`; // follow the format in head.tmpl: <head><title>...</title></head>
0 commit comments