1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

fix(lsp): treat empty import map value config as none (#16224)

Ref: denoland/vscode_deno#718

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
Tomofumi Chiba 2022-10-17 08:01:10 +09:00 committed by GitHub
parent d2c8b5f087
commit 2b35cb3f2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -500,8 +500,12 @@ impl Inner {
pub async fn update_import_map(&mut self) -> Result<(), AnyError> {
let mark = self.performance.mark("update_import_map", None::<()>);
let maybe_import_map_url = if let Some(import_map_str) =
self.config.get_workspace_settings().import_map
let maybe_import_map_url = if let Some(import_map_str) = self
.config
.get_workspace_settings()
.import_map
.and_then(|s| if s.is_empty() { None } else { Some(s) })
{
lsp_log!(
"Setting import map from workspace settings: \"{}\"",