diff --git a/MVMCoreUI/Atomic/Organisms/Carousel/Carousel.swift b/MVMCoreUI/Atomic/Organisms/Carousel/Carousel.swift index fb333772..f84bdfc5 100644 --- a/MVMCoreUI/Atomic/Organisms/Carousel/Carousel.swift +++ b/MVMCoreUI/Atomic/Organisms/Carousel/Carousel.swift @@ -285,7 +285,7 @@ open class Carousel: View { /// Registers the cells with the collection view func registerCells(with carouselModel: CarouselModel, delegateObject: MVMCoreUIDelegateObject?) { var registeredIds = [String]() - for molecule in carouselModel.molecules { + for molecule in carouselModel.visibleMolecules { if let info = getMoleculeInfo(with: molecule, delegateObject: delegateObject) { collectionView.register(info.class, forCellWithReuseIdentifier: info.identifier) registeredIds.append(info.identifier) @@ -299,7 +299,7 @@ open class Carousel: View { func hasSameCellRegistration(with carouselModel: CarouselModel, delegateObject: MVMCoreUIDelegateObject?) -> Bool { guard let registeredMoleculeIds else { return false } - let incomingIds = carouselModel.molecules.map { molecule in + let incomingIds = carouselModel.visibleMolecules.map { molecule in if let info = getMoleculeInfo(with: molecule, delegateObject: delegateObject) { return info.identifier } else {