Add null check for logger before logging errors in position validation
This commit is contained in:
@@ -427,7 +427,9 @@ class MeasurementContainer {
|
||||
return Number.NEGATIVE_INFINITY;
|
||||
|
||||
default:
|
||||
if (this.logger) {
|
||||
this.logger.error(`Invalid positionVsParent provided: ${positionString}`);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -442,8 +444,10 @@ class MeasurementContainer {
|
||||
if (positionValue > 0) {
|
||||
return "downstream";
|
||||
}
|
||||
if (this.logger) {
|
||||
this.logger.error(`Invalid position provided: ${positionValue}`);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user