Skip to content

Commit 6b6e09a

Browse files
committed
Fix potential error by ensuring headerElement exists before appending the copy button in GitHub Copy List of PRs 🛠️🔧
1 parent 02df19f commit 6b6e09a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

copyListOfPRs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
const headerElement = document.querySelector(
6868
"#js-issues-toolbar .table-list-header-toggle"
6969
);
70-
headerElement.appendChild(button);
70+
headerElement && headerElement.appendChild(button);
7171
}
7272

7373
createCopyButton();

0 commit comments

Comments
 (0)