diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2021-02-12 22:49:42 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-12 22:49:42 +1100 |
commit | 79916226b74bf9593afacbcdfe9d58263bed132f (patch) | |
tree | c67584ff535adfe98fa7f8cdd6e27a9c4bf233e0 /cli/lsp/diagnostics.rs | |
parent | 54e53cc9ea0767dfe8a44f92361f68c03f5f038f (diff) |
fix(lsp): properly handle static assets (#9476)
Diffstat (limited to 'cli/lsp/diagnostics.rs')
-rw-r--r-- | cli/lsp/diagnostics.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/lsp/diagnostics.rs b/cli/lsp/diagnostics.rs index 1ea2cce14..1237ff7a3 100644 --- a/cli/lsp/diagnostics.rs +++ b/cli/lsp/diagnostics.rs @@ -294,7 +294,7 @@ pub async fn generate_dependency_diagnostics( }) } ResolvedDependency::Resolved(specifier) => { - if !(state_snapshot.documents.contains(&specifier) || sources.contains(&specifier)) { + if !(state_snapshot.documents.contains_key(&specifier) || sources.contains_key(&specifier)) { let is_local = specifier.as_url().scheme() == "file"; let (code, message) = if is_local { (Some(lsp::NumberOrString::String("no-local".to_string())), format!("Unable to load a local module: \"{}\".\n Please check the file path.", specifier)) |