Skip to content

Commit

Permalink
fix: send diagnostics when config couldn't be parsed (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
abdelDriowya authored Dec 14, 2023
1 parent 30cddb8 commit 5c374dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/services/diagnostics.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func DiagnosticString(content string, cache *utils.Cache, context *utils.LsConte
}

func DiagnosticYAML(yamlDocument yamlparser.YamlDocument, cache *utils.Cache, context *utils.LsContext) ([]protocol.Diagnostic, error) {
if yamlDocument.Version < 2.1 {
if yamlDocument.Version != 0 && yamlDocument.Version < 2.1 {
// TODO: Handle error
return []protocol.Diagnostic{}, nil
}
Expand Down

0 comments on commit 5c374dc

Please sign in to comment.