Skip to content

Commit 2b250ad

Browse files
committed
Remove run error on focusMe
1 parent 55c97b1 commit 2b250ad

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/static/app/js/custom.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
setTimeout(function focusMe() {
2-
document.getElementById("focus-here").scrollIntoView();
2+
const elem = document.getElementById("focus-here");
3+
if (elem) {
4+
elem.scrollIntoView();
5+
}
36
});
47

58
function share(title, link) {
@@ -21,4 +24,4 @@ function checkEmpty() {
2124
else {
2225
return true;
2326
}
24-
}
27+
}

0 commit comments

Comments
 (0)