mirror of
https://github.com/denoland/std.git
synced 2024-11-22 04:59:05 +00:00
refactor(cli): use non-null assertion in parseArgs()
logic (#5618)
This commit is contained in:
parent
8b21698495
commit
12d6097289
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user