diff --git a/MVMCoreUI/Atoms/Buttons/Button.swift b/MVMCoreUI/Atoms/Buttons/Button.swift index 66bed2b3..2845e66a 100644 --- a/MVMCoreUI/Atoms/Buttons/Button.swift +++ b/MVMCoreUI/Atoms/Buttons/Button.swift @@ -26,12 +26,12 @@ public typealias ButtonBlock = (Button) -> Void public func setWithActionMap(_ actionMap: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) { self.actionMap = actionMap - self.titleLabel?.numberOfLines = 0 - self.titleLabel?.lineBreakMode = .byWordWrapping + titleLabel?.numberOfLines = 0 + titleLabel?.lineBreakMode = .byWordWrapping buttonDelegate = delegateObject?.buttonDelegate - self.addBlock({ [weak self] (sender) in + addBlock({ [weak self] (sender) in guard let self = self, let performAction = self.buttonDelegate?.button?(self, shouldPerformActionWithMap: actionMap, additionalData: additionalData), performAction else { return }