Skip to content

Commit ab2bf62

Browse files
committed
cleanup code
1 parent 6baa1b6 commit ab2bf62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Components/Sources/Common/Protocols/Editor.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public struct EditorBuilder<T: Editor> {
3232
}
3333

3434
public static func buildArray(_ components: [[T]]) -> [T] {
35-
Array(components.joined())
35+
return Array(components.joined())
3636
}
3737

3838
// to use like if-else
@@ -46,6 +46,6 @@ public struct EditorBuilder<T: Editor> {
4646
}
4747

4848
public static func buildOptional(_ component: [T]?) -> [T] {
49-
return []
49+
return component ?? []
5050
}
5151
}

0 commit comments

Comments
 (0)