mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-10 14:06:30 +00:00
Check nodes explicitly to be null instead of relying on fallback
Cleaner, don't check twice and increases cov
This commit is contained in:
parent
9146253594
commit
f0c2dceddc
1 changed files with 6 additions and 6 deletions
|
@ -24,14 +24,14 @@ export function extractPackageFile(
|
||||||
|
|
||||||
const flakeLock = flakeLockParsed.data;
|
const flakeLock = flakeLockParsed.data;
|
||||||
|
|
||||||
for (const depName of Object.keys(flakeLock.nodes ?? {})) {
|
|
||||||
// the root input is a magic string for the entrypoint and only references other flake inputs
|
|
||||||
if (depName === 'root') {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// skip if there are no inputs
|
// skip if there are no inputs
|
||||||
if (flakeLock.nodes === undefined) {
|
if (flakeLock.nodes === undefined) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const depName of Object.keys(flakeLock.nodes)) {
|
||||||
|
// the root input is a magic string for the entrypoint and only references other flake inputs
|
||||||
|
if (depName === 'root') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue