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) {
|
if (HandlerClass) {
|
||||||
const instance = new HandlerClass();
|
const instance = new HandlerClass();
|
||||||
if (instance.name && typeof instance.name === 'string') {
|
if (instance.name && typeof instance.name === 'string') {
|
||||||
instance.setBmadFolderName(this.bmadFolderName);
|
if (typeof instance.setBmadFolderName === 'function') {
|
||||||
|
instance.setBmadFolderName(this.bmadFolderName);
|
||||||
|
}
|
||||||
this.handlers.set(instance.name, instance);
|
this.handlers.set(instance.name, instance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -102,7 +104,9 @@ class IdeManager {
|
||||||
if (!platformInfo.installer) continue;
|
if (!platformInfo.installer) continue;
|
||||||
|
|
||||||
const handler = new ConfigDrivenIdeSetup(platformCode, platformInfo);
|
const handler = new ConfigDrivenIdeSetup(platformCode, platformInfo);
|
||||||
handler.setBmadFolderName(this.bmadFolderName);
|
if (typeof handler.setBmadFolderName === 'function') {
|
||||||
|
handler.setBmadFolderName(this.bmadFolderName);
|
||||||
|
}
|
||||||
this.handlers.set(platformCode, handler);
|
this.handlers.set(platformCode, handler);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue