Skip to content

Commit 41a8929

Browse files
authored
Merge pull request #6 from ibsh/master
Re-fix the crash with empty meta elements
2 parents 4dc572a + ad6967f commit 41a8929

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Sources/Meta/PlainCode.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,12 @@ extension MetaCode {
5656
}
5757

5858
public var swiftString: String {
59-
guard metaElements.isEmpty == false else { return String() }
6059
var string = metaElements
6160
.map { $0.swiftString }
6261
.indented(indentation)
63-
string.removeLast()
62+
if string.isEmpty == false {
63+
string.removeLast()
64+
}
6465
return string
6566
}
6667
}

0 commit comments

Comments
 (0)