From f871e566794e2660255ea88c45b4d5c6a72085cf Mon Sep 17 00:00:00 2001 From: Ekko Date: Tue, 19 Apr 2022 21:00:37 +0800 Subject: [PATCH] make apply to self instead declarativeView --- Classes/Extensions/DeclarativeProtocol+Apply.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/Extensions/DeclarativeProtocol+Apply.swift b/Classes/Extensions/DeclarativeProtocol+Apply.swift index 3ef6197..ff1ffb9 100644 --- a/Classes/Extensions/DeclarativeProtocol+Apply.swift +++ b/Classes/Extensions/DeclarativeProtocol+Apply.swift @@ -11,8 +11,8 @@ extension DeclarativeProtocol { /// } /// ``` @discardableResult - public func apply(_ closure: (V) -> Void) -> Self { - closure(declarativeView) + public func apply(_ closure: (Self) -> Void) -> Self { + closure(self) return self } }