Skip to content

Commit

Permalink
fix: should not report error on unknown directives
Browse files Browse the repository at this point in the history
close #1036
  • Loading branch information
johnsoncodehk committed Mar 13, 2022
1 parent 4efd666 commit 8cb50cc
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -207,7 +207,11 @@ export function register(context: LanguageServiceRuntimeContext, updateTemplateS

if (sourceMap) {

const sourceRange = sourceMap.getSourceRange(error.range.start, error.range.end)?.[0];
const sourceRange = sourceMap.getSourceRange(
error.range.start,
error.range.end,
data => !!data.capabilities.diagnostic,
)?.[0];

if (!sourceRange)
continue;
Expand Down

0 comments on commit 8cb50cc

Please sign in to comment.