Skip to content

Commit 6fb0a71

Browse files
committed
Change info.hints check style when parsing header
Use ternary instead of a combination of optional chaining and null coalescing.
1 parent 925dadf commit 6fb0a71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/core.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -866,8 +866,8 @@ function parseHeader(info) {
866866
tree: info.head || getDefaultTree(),
867867
hints: {
868868
reorgs: [],
869-
contiguousLength: info.hints?.contiguousLength ?? 0,
870-
remoteContiguousLength: info.hints?.remoteContiguousLength ?? 0
869+
contiguousLength: info.hints ? info.hints.contiguousLength : 0,
870+
remoteContiguousLength: info.hints ? info.hints.remoteContiguousLength : 0
871871
}
872872
}
873873
}

0 commit comments

Comments
 (0)