From 0ca2ed2511f55c5db05a0e72f6d07b8442bd8180 Mon Sep 17 00:00:00 2001 From: Derek Yang Date: Fri, 22 Sep 2023 17:42:26 +0800 Subject: [PATCH 1/2] Update ButtonBinding.swift --- test-app/ios-uikit/TestApp/ButtonBinding.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-app/ios-uikit/TestApp/ButtonBinding.swift b/test-app/ios-uikit/TestApp/ButtonBinding.swift index e4ea479304..583624a330 100644 --- a/test-app/ios-uikit/TestApp/ButtonBinding.swift +++ b/test-app/ios-uikit/TestApp/ButtonBinding.swift @@ -48,7 +48,7 @@ class ButtonBinding: Button { @objc func clicked() { if (self.onClick != nil) { - self.onClick() + self.onClick?() } } } From 20743a15be02c582a078cb4cde9d19a573953492 Mon Sep 17 00:00:00 2001 From: Jake Wharton Date: Mon, 25 Sep 2023 16:34:30 -0400 Subject: [PATCH 2/2] Remove redundant conditional --- test-app/ios-uikit/TestApp/ButtonBinding.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test-app/ios-uikit/TestApp/ButtonBinding.swift b/test-app/ios-uikit/TestApp/ButtonBinding.swift index 583624a330..920efdd836 100644 --- a/test-app/ios-uikit/TestApp/ButtonBinding.swift +++ b/test-app/ios-uikit/TestApp/ButtonBinding.swift @@ -47,8 +47,6 @@ class ButtonBinding: Button { } @objc func clicked() { - if (self.onClick != nil) { - self.onClick?() - } + self.onClick?() } }