Skip to content

Commit a33a729

Browse files
committed
Adds comments
1 parent c465a6b commit a33a729

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

WooCommerce/Classes/View Modifiers/View+AutofocusTextModifier.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ extension View {
2727
/// Autofocus in `TextField` and `TextEditor` is available only for iOS15+
2828
///
2929
func focused() -> some View {
30+
// Conditional check has to be done inside the Group function builder,
31+
// otherwise the iOS 15 modifier will be loaded into memory and the app will crash.
3032
Group {
3133
if #available(iOS 15.0, *) {
3234
self.modifier(AutofocusTextModifier())

0 commit comments

Comments
 (0)