Skip to content

Commit 324c93f

Browse files
committed
Fixed missed bug in 2.2.0
1 parent 76791ef commit 324c93f

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

Sources/Vexil/Diagnostics.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@ extension Array where Element == FlagPoleDiagnostic {
3838

3939
/// Creates diagnostic cases from a changed snapshot
4040
init<Root> (changed: Snapshot<Root>, sources: [String]?) where Root: FlagContainer {
41-
let changedBy: String?
42-
if let sources = sources {
43-
changedBy = Set(sources).sorted().joined(separator: ", ")
44-
} else {
45-
changedBy = nil
41+
guard let sources = sources else {
42+
self = .init(current: changed)
43+
return
4644
}
45+
let changedBy = Set(sources).sorted().joined(separator: ", ")
4746

4847
self = changed.values
4948
.sorted(by: { $0.key < $1.key })

0 commit comments

Comments
 (0)