We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4e7ee5f + f1aa796 commit 76204d7Copy full SHA for 76204d7
rest/api.go
@@ -140,7 +140,11 @@ func (a *API) diagnostics(w http.ResponseWriter, r *http.Request) {
140
return
141
}
142
143
- items := diagnostics.Diagnostics
+ items := []protocol.Diagnostic{}
144
+ if diagnostics != nil {
145
+ items = diagnostics.Diagnostics
146
+ }
147
+
148
limit := requestData.Limit
149
if limit != nil && uint64(len(items)) > *limit {
150
items = items[:*limit]
@@ -204,7 +208,10 @@ func (a *API) completion(w http.ResponseWriter, r *http.Request) {
204
208
205
209
206
210
207
- items := completion.Items
211
+ items := []protocol.CompletionItem{}
212
+ if completion != nil {
213
+ items = completion.Items
214
215
216
217
0 commit comments