feat: allow empty extensions to return an empty Vec (#2111)

This commit is contained in:
Alex Hancock
2025-04-09 12:27:55 -04:00
committed by GitHub
parent 88950eab64
commit 7575962f1f
+3 -1
View File
@@ -125,7 +125,9 @@ impl ExtensionManager {
/// Get all extensions and their configurations
pub fn get_all() -> Result<Vec<ExtensionEntry>> {
let config = Config::global();
let extensions: HashMap<String, ExtensionEntry> = config.get_param("extensions")?;
let extensions: HashMap<String, ExtensionEntry> = config
.get_param("extensions")
.unwrap_or_else(|_| HashMap::new());
Ok(Vec::from_iter(extensions.values().cloned()))
}