Add distance float position handling with backward compatibility #1
@@ -233,7 +233,18 @@ class ChildRegistrationUtils {
|
||||
this.logger.warn("Invalid reactor provided.");
|
||||
return;
|
||||
}
|
||||
this.mainClass.upstreamReactor = reactor; // Add reactor to the main class
|
||||
|
||||
// this is poor code, it should be fixed at some point
|
||||
if (this.mainClass?.upstreamReactor){
|
||||
this.mainClass.upstreamReactor = reactor; // Add reactor to the main class
|
||||
} else {
|
||||
if (positionVsParent == "downstream") {
|
||||
this.mainClass.reactors[0] = reactor;
|
||||
}
|
||||
if (positionVsParent == "upstream") {
|
||||
this.mainClass.reactors[1] = reactor;
|
||||
}
|
||||
}
|
||||
this.logger.info(`Reactor registered successfully.`);
|
||||
|
||||
reactor.emitter.on("stateChange", (data) => {
|
||||
|
||||
Reference in New Issue
Block a user