using optional chaining seems to break older browsers
https://caniuse.com/mdn-javascript_operators_optional_chaining it seems to be less supported on mobile devices then I'd expect so here's a justification for it i guess reported here: https://www.themotte.org/post/563/meta-a-whole-host-of-minor/122837
This commit is contained in:
parent
b4b3e03dc7
commit
4ebe96b003
1 changed files with 6 additions and 1 deletions
|
@ -67,7 +67,12 @@ function commentsAddUnreadIndicator(commentIds) {
|
|||
}
|
||||
if (commentOnly.classList.contains("unread")) return;
|
||||
commentOnly.classList.add("unread");
|
||||
const commentUserInfo = document.getElementById(`comment-${element}`)?.querySelector(".comment-user-info");
|
||||
const commentElement = document.getElementById(`comment-${element}`);
|
||||
if (!commentElement) {
|
||||
console.warn(`Couldn't find comment (ID ${element}) in page while attempting to add an unread indicator.`);
|
||||
return;
|
||||
}
|
||||
const commentUserInfo = commentElement.querySelector(".comment-user-info");
|
||||
if (!commentUserInfo) {
|
||||
console.warn(`Couldn't find comment user info (comment ID ${element}) in page while attempting to add an unread indicator.`);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue