Skip to content

Commit

Permalink
Fix for #18
Browse files Browse the repository at this point in the history
  • Loading branch information
JPinkney committed Nov 20, 2017
1 parent 995233c commit bb71909
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/languageService/services/yamlHover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export class YAMLHover {

let offset = document.offsetAt(position);
let currentDoc = matchOffsetToDocument(offset, doc);
if(currentDoc === null){
return null;
}
let node = currentDoc.getNodeFromOffset(offset);
if (!node || (node.type === 'object' || node.type === 'array') && offset > node.start + 1 && offset < node.end - 1) {
return this.promise.resolve(void 0);
Expand Down

0 comments on commit bb71909

Please sign in to comment.