Skip to content

Commit 05e7cca

Browse files
authored
修复 GithubEnhanced 每次打开 Clone 面板都报错 Cannot set properties of null (setting 'hidden')
关闭【添加 git clone 命令】选项时,每次切换 Clone 面板显示/隐藏时都会报错 Cannot set properties of null (setting 'hidden')
1 parent bd2ed31 commit 05e7cca

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

GithubEnhanced-High-Speed-Download.user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@
292292
let href_split = html.value.split(location.host)[1],
293293
html_parent = '<div style="margin-top: 4px;" class="XIU2-GC ' + html.parentElement.className + '">',
294294
url = '', _html = '', _gitClone = '';
295-
html.nextElementSibling.hidden = true; // 隐藏右侧复制按钮(考虑到能直接点击复制,就不再重复实现复制按钮事件了)
295+
if (html.nextElementSibling) html.nextElementSibling.hidden = true; // 隐藏右侧复制按钮(考虑到能直接点击复制,就不再重复实现复制按钮事件了)
296296
if (html.parentElement.nextElementSibling.tagName === 'SPAN'){
297297
html.parentElement.nextElementSibling.textContent += ' (↑点击上面文字可复制)'
298298
}

0 commit comments

Comments
 (0)