From db0afbb15dcae59fcef81cbcc1da9a2b570ba957 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 14 Feb 2023 13:56:09 -0600 Subject: [PATCH] added weak self Signed-off-by: Matt Bruce --- MVMCoreUI/Atomic/Atoms/Views/Tilelet.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Views/Tilelet.swift b/MVMCoreUI/Atomic/Atoms/Views/Tilelet.swift index 72b3a07a..8b7fc312 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/Tilelet.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/Tilelet.swift @@ -49,7 +49,6 @@ open class Tilelet: VDS.Tilelet, VDSMoleculeViewProtocol{ badgeModel = viewModel.badge descriptiveIconModel = viewModel.descriptiveIcon directionalIconModel = viewModel.directionalIcon - //setup action if let action = viewModel.action { //add the subscriber @@ -87,7 +86,8 @@ open class Tilelet: VDS.Tilelet, VDSMoleculeViewProtocol{ open override func layoutSubviews() { super.layoutSubviews() // Accounts for any collection size changes - DispatchQueue.main.async { + DispatchQueue.main.async { [weak self] in + guard let self else { return } self.delegateObject?.moleculeDelegate?.moleculeLayoutUpdated(self) } }