Skip to content

Commit

Permalink
Reorder order of if-else
Browse files Browse the repository at this point in the history
  • Loading branch information
natgeo-wong committed Sep 7, 2024
1 parent 0cc6c08 commit 38874cc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/isin/georegion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,12 @@ function isinGeoRegion(
end
end

if isin > 0
if iszero(isin)

@info "$(modulelog()) - The GeoRegion $(Child.ID) ($(Child.name)) is indeed a subset of the GeoRegion $(polyG.ID) ($(polyG.name))"
return true

else

if throw
error("$(modulelog()) - The GeoRegion $(Child.ID) ($(Child.name)) is not a subset of the GeoRegion $(polyG.ID) ($(polyG.name))")
Expand All @@ -162,9 +167,6 @@ function isinGeoRegion(
return false
end

else
@info "$(modulelog()) - The GeoRegion $(Child.ID) ($(Child.name)) is indeed a subset of the GeoRegion $(polyG.ID) ($(polyG.name))"
return true
end

end

0 comments on commit 38874cc

Please sign in to comment.