From a7e0489b7bc077c79a7f8811bbca9c558599ad7d Mon Sep 17 00:00:00 2001 From: Rafael Schouten Date: Mon, 1 Apr 2024 22:05:28 +0200 Subject: [PATCH] Update src/polygons.jl Co-authored-by: Anshul Singhvi --- src/polygons.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/polygons.jl b/src/polygons.jl index 55af94b..3599abf 100644 --- a/src/polygons.jl +++ b/src/polygons.jl @@ -94,7 +94,7 @@ function GI.getgeom(::GI.MultiPolygonTrait, geom::AbstractPolygon, i::Integer) return SubPolygon(rings) end function GI.getgeom(::GI.MultiPolygonTrait, geom::AbstractPolygon{T}) where {T} - if length(geom.indexcache) == 0 + if isempty(geom.indexcache) _build_cache!(geom) end return map(geom.indexcache) do indices