mirror of
https://github.com/go-gitea/gitea.git
synced 2025-11-10 15:32:55 +09:00
Fix a number of strictNullChecks-related issues (#35795)
In preparation to work on enabling https://www.typescriptlang.org/tsconfig/#strictNullChecks, I fixed all the issues outside of `web_src` that came up when the option was enabled. There was also one lint issue in web_src that apparently only came up with the option enabled, so I fixed that as well. `isTruthy` is introduced because Typescript has a bug regarding `filter(Boolean)` which they are seemingly unwilling to fix. --------- Signed-off-by: silverwind <me@silverwind.io>
This commit is contained in:
@@ -261,7 +261,7 @@ export function initRepoPullRequestReview() {
|
||||
if (commentDiv) {
|
||||
// get the name of the parent id
|
||||
const groupID = commentDiv.closest('div[id^="code-comments-"]')?.getAttribute('id');
|
||||
if (groupID && groupID.startsWith('code-comments-')) {
|
||||
if (groupID?.startsWith('code-comments-')) {
|
||||
const id = groupID.slice(14);
|
||||
const ancestorDiffBox = commentDiv.closest<HTMLElement>('.diff-file-box');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user