diff --git a/src/Toolkit/Toolkit/UI/Controls/BasemapGallery/BasemapGalleryItem.cs b/src/Toolkit/Toolkit/UI/Controls/BasemapGallery/BasemapGalleryItem.cs index a2f7f797c..5123b432d 100644 --- a/src/Toolkit/Toolkit/UI/Controls/BasemapGallery/BasemapGalleryItem.cs +++ b/src/Toolkit/Toolkit/UI/Controls/BasemapGallery/BasemapGalleryItem.cs @@ -246,10 +246,10 @@ internal bool EqualsBasemap(Basemap? other) return false; } - return other == Basemap || (Basemap.BaseLayers.Count == other.BaseLayers.Count - && Basemap.BaseLayers.All(layer => other?.BaseLayers.FirstOrDefault(l => l.Name == layer.Name) is not null)) - || (other.Item?.ItemId != null && other.Item?.ItemId == Basemap?.Item?.ItemId) - || (other.Uri != null && other.Uri == Basemap?.Uri); + return other == Basemap || (other.Item?.ItemId != null && other.Item?.ItemId == Basemap?.Item?.ItemId) + || (other.Uri != null && other.Uri == Basemap?.Uri) + || (Basemap?.BaseLayers.Count == other.BaseLayers.Count + && Basemap.BaseLayers.All(layer => other?.BaseLayers.FirstOrDefault(l => l.Name == layer.Name) is not null)); } ///