Skip to content

Commit

Permalink
fix: value completion regex condition
Browse files Browse the repository at this point in the history
 - group 1 can be undefined
  • Loading branch information
p-spacek authored and gorkem committed Jan 27, 2023
1 parent 6bacc8a commit 13bc7f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/languageservice/services/yamlCompletion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class YamlCompletion {
// OR get unfinished value (between colon and cursor)
lineToPosition.match(/:[ \t]((?!:[ \t]).*)$/);

if (matches?.length) {
if (matches?.[1]) {
overwriteRange = Range.create(
Position.create(position.line, position.character - matches[1].length),
Position.create(position.line, lineContent.length)
Expand Down

0 comments on commit 13bc7f7

Please sign in to comment.