diff --git a/Sources/Swiftagram/Models/Specialized/Section.swift b/Sources/Swiftagram/Models/Specialized/Section.swift index 1c6a8b76..e332826e 100644 --- a/Sources/Swiftagram/Models/Specialized/Section.swift +++ b/Sources/Swiftagram/Models/Specialized/Section.swift @@ -13,7 +13,16 @@ public struct Section: Wrapped { public var wrapper: () -> Wrapper /// Media in the response. - public var items: [Media]? { self["layoutContent"].medias.array()?.compactMap(Media.init) } + public var items: [Media]? { + self["layoutContent"] + .fillItems + .array()? + .compactMap { $0.media.optional().flatMap(Media.init) } + ?? self["layoutContent"] + .medias + .array()? + .compactMap { $0.media.optional().flatMap(Media.init) } + } /// Init. /// - parameter wrapper: A valid `Wrapper`.