Skip to content

Commit 4306601

Browse files
fix(diag): Diagnostics no longer attempts to append if supplied diags are empty.
1 parent 87723d4 commit 4306601

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

diag/diagnostics.go

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ type Diagnostics []Diagnostic
55

66
// Append adds a number of new diagnostic entries to the diagnostics.
77
func (d *Diagnostics) Append(diags ...Diagnostic) {
8+
if len(diags) == 0 {
9+
// Nothing to append!
10+
return
11+
}
12+
813
*d = append(*d, diags...)
914
}
1015

0 commit comments

Comments
 (0)