mirror of
https://github.com/github/codeql-action.git
synced 2026-01-04 21:50:17 +08:00
Linting: Prefer optional chaining
This commit is contained in:
@@ -943,7 +943,7 @@ async function getRemoteConfig(
|
||||
);
|
||||
const pieces = format.exec(configFile);
|
||||
// 5 = 4 groups + the whole expression
|
||||
if (pieces === null || pieces.groups === undefined || pieces.length < 5) {
|
||||
if (pieces?.groups === undefined || pieces.length < 5) {
|
||||
throw new ConfigurationError(
|
||||
errorMessages.getConfigFileRepoFormatInvalidMessage(configFile),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user