fix: add safety checks for setBmadFolderName method calls in IdeManager
This commit is contained in:
parent
a6a960f88c
commit
1d505b17b4
|
|
@ -74,7 +74,9 @@ class IdeManager {
|
|||
if (HandlerClass) {
|
||||
const instance = new HandlerClass();
|
||||
if (instance.name && typeof instance.name === 'string') {
|
||||
if (typeof instance.setBmadFolderName === 'function') {
|
||||
instance.setBmadFolderName(this.bmadFolderName);
|
||||
}
|
||||
this.handlers.set(instance.name, instance);
|
||||
}
|
||||
}
|
||||
|
|
@ -102,7 +104,9 @@ class IdeManager {
|
|||
if (!platformInfo.installer) continue;
|
||||
|
||||
const handler = new ConfigDrivenIdeSetup(platformCode, platformInfo);
|
||||
if (typeof handler.setBmadFolderName === 'function') {
|
||||
handler.setBmadFolderName(this.bmadFolderName);
|
||||
}
|
||||
this.handlers.set(platformCode, handler);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue