Skip to content

Commit c7b05d5

Browse files
authored
Fixed infinite loop triggered when requesting media by ID in a folder via the media delivery API. (#17876)
1 parent e7ee7c6 commit c7b05d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Umbraco.Infrastructure/DeliveryApi/ApiMediaWithCropsResponseBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Umbraco.Cms.Core.DeliveryApi;
1+
using Umbraco.Cms.Core.DeliveryApi;
22
using Umbraco.Cms.Core.Models.DeliveryApi;
33
using Umbraco.Cms.Core.Models.PublishedContent;
44
using Umbraco.Cms.Core.PublishedCache;
@@ -38,7 +38,7 @@ private IEnumerable<string> PathSegments(IPublishedContent media)
3838
while (current != null)
3939
{
4040
yield return current.Name.ToLowerInvariant();
41-
current = GetParent(media);
41+
current = GetParent(current);
4242
}
4343
}
4444

0 commit comments

Comments
 (0)