Skip to content

Commit 4dc572a

Browse files
authored
Merge pull request #5 from ibsh/master
Fix generation crash for empty lists
2 parents a955d8d + 58a22e5 commit 4dc572a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/Meta/PlainCode.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ extension MetaCode {
5656
}
5757

5858
public var swiftString: String {
59+
guard metaElements.isEmpty == false else { return String() }
5960
var string = metaElements
6061
.map { $0.swiftString }
6162
.indented(indentation)

0 commit comments

Comments
 (0)