We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa50e12 commit 4080ab7Copy full SHA for 4080ab7
Components/Sources/Common/Protocols/Editor.swift
@@ -35,7 +35,7 @@ public struct EditorBuilder<T: Editor> {
35
Array(components.joined())
36
}
37
38
- // to use like if else
+ // to use like if-else
39
40
public static func buildEither(first component: T) -> T {
41
return component
@@ -44,4 +44,8 @@ public struct EditorBuilder<T: Editor> {
44
public static func buildEither(second component: T) -> T {
45
46
47
+
48
+ public static func buildOptional(_ component: [T]?) -> [T] {
49
+ return []
50
+ }
51
0 commit comments