Skip to content

Commit 79f9852

Browse files
Fix bug where all non-duplicated keys are reported as duplicates
This only printed an error message (no errors in functionality), but is definitely annoying
1 parent f4dd13d commit 79f9852

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/AttachmentsEverywhere/API/Attachments/AttachmentContentBuilder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public enum AttachmentContentBuilder {
3434
public static func buildPartialBlock(accumulated: AttachmentContent, next: AttachmentContent) -> AttachmentContent {
3535
var res = accumulated
3636
for (key, value) in next {
37-
if next.contains(where: { $0.key == key }) {
37+
if accumulated.contains(where: { $0.key == key }) {
3838
print("[AttachmentsEverywhere] warning: duplicate key in attachment content: \(String(reflecting: key))")
3939
}
4040
res[key] = value

0 commit comments

Comments
 (0)