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

@@ -371,7 +371,7 @@ function getInputOrThrow(
input = input.replace(`\${{matrix.${key}}}`, value);
}
}
if (input !== undefined && input.includes("${{")) {
if (input?.includes("${{")) {
throw new Error(
`Could not get ${inputName} input to ${actionName} since it contained an unrecognized dynamic value.`,
);