agent updates
This commit is contained in:
@@ -36,7 +36,21 @@ class MenuManager {
|
||||
|
||||
try {
|
||||
const config = this.configManager.getConfig(nodeName);
|
||||
return config?.functionality?.softwareType || nodeName;
|
||||
const softwareType = config?.functionality?.softwareType;
|
||||
|
||||
if (typeof softwareType === 'string' && softwareType.trim()) {
|
||||
return softwareType;
|
||||
}
|
||||
if (
|
||||
softwareType &&
|
||||
typeof softwareType === 'object' &&
|
||||
typeof softwareType.default === 'string' &&
|
||||
softwareType.default.trim()
|
||||
) {
|
||||
return softwareType.default;
|
||||
}
|
||||
|
||||
return nodeName;
|
||||
} catch (error) {
|
||||
console.warn(`Unable to determine softwareType for ${nodeName}: ${error.message}`);
|
||||
return nodeName;
|
||||
|
||||
Reference in New Issue
Block a user