Skip to content

Commit

Permalink
fix: a possible crash that might happen when the acestor descendant i…
Browse files Browse the repository at this point in the history
…s null

Wtf java, also cc @sk22
  • Loading branch information
LucasGGamerM committed Dec 8, 2023
1 parent 3d48443 commit 3bf63e1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public static List<NeighborAncestryInfo> mapNeighborhoodAncestry(Status mainStat
// ancestoring neighbor
Optional.ofNullable(index > 0 ? ancestry.get(index - 1) : null)
.filter(ancestor -> Optional.ofNullable(ancestor.descendantNeighbor)
.map(ancestorsDescendant -> ancestorsDescendant.id.equals(current.id))
.map(ancestorsDescendant -> current.id.equals(ancestorsDescendant.id))
.orElse(false))
.map(a -> a.status)
.orElse(null)
Expand Down

0 comments on commit 3bf63e1

Please sign in to comment.