Linting: Prefer optional chaining

This commit is contained in:
Henry Mercer
2025-10-22 16:55:06 +01:00
parent 0c5185d061
commit e5f165b8f5
14 changed files with 30 additions and 32 deletions

View File

@@ -168,7 +168,7 @@ export function tryGetTagNameFromUrl(
// assumes less about the structure of the URL.
const match = matches[matches.length - 1];
if (match === null || match.length !== 2) {
if (match?.length !== 2) {
logger.debug(
`Could not determine tag name for URL ${url}. Matched ${JSON.stringify(
match,