Refactor child setup to support multiple parents consistently
This commit is contained in:
@@ -11,11 +11,11 @@ class ChildRegistrationUtils {
|
||||
|
||||
this.logger.debug(`Registering child: ${name} (${id}) as ${softwareType} at ${positionVsParent}`);
|
||||
|
||||
// Enhanced child setup - optional multiple parents
|
||||
// Enhanced child setup - multiple parents
|
||||
if (Array.isArray(child.parent)) {
|
||||
child.parent.push(this.mainClass);
|
||||
} else {
|
||||
child.parent = this.mainClass;
|
||||
child.parent = [this.mainClass];
|
||||
}
|
||||
child.positionVsParent = positionVsParent;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user