refactor(cli): use non-null assertion in parseArgs() logic (#5618)

This commit is contained in:
Asher Gomez 2024-08-02 15:34:53 +10:00 committed by GitHub
parent 8b21698495
commit 12d6097289
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -374,8 +374,7 @@ function setNested(
collect = false,
) {
keys = [...keys];
const key = keys.pop();
if (!key) throw new Error(`'keys' cannot be an empty array.`);
const key = keys.pop()!;
keys.forEach((key) => object = (object[key] ??= {}) as NestedMapping);