diff --git a/providers/ObjectScriptHoverProvider.ts b/providers/ObjectScriptHoverProvider.ts index 9ce73f40..c0cfc755 100644 --- a/providers/ObjectScriptHoverProvider.ts +++ b/providers/ObjectScriptHoverProvider.ts @@ -14,6 +14,9 @@ export class ObjectScriptHoverProvider implements vscode.HoverProvider { position: vscode.Position, token: vscode.CancellationToken, ): vscode.ProviderResult { + if (!document.getWordRangeAtPosition(position)) { + return; + } return this.dollars(document, position) || this.commands(document, position); }