debugger: Don't take JS adapter's suggested child session name if it's empty (#33739)
Related to #33072 We use the JS adapter's suggested names for child sessions, but sometimes it sends us `""`, so don't use that one. Release Notes: - debugger: Fixed nameless child sessions appearing with the JavaScript adapter.
This commit is contained in:
@@ -522,7 +522,11 @@ impl DebugAdapter for JsDebugAdapter {
|
||||
}
|
||||
|
||||
fn label_for_child_session(&self, args: &StartDebuggingRequestArguments) -> Option<String> {
|
||||
let label = args.configuration.get("name")?.as_str()?;
|
||||
let label = args
|
||||
.configuration
|
||||
.get("name")?
|
||||
.as_str()
|
||||
.filter(|name| !name.is_empty())?;
|
||||
Some(label.to_owned())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user