Merge pull request #13087 from vvlladd28/rule-node/time-unit/invalid-state

Fixed time-unit component not correctly calculating selected time
This commit is contained in:
Igor Kulikov 2025-04-02 13:21:03 +03:00 committed by GitHub
commit 290b0da877
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -177,7 +177,7 @@ export class TimeUnitInputComponent implements ControlValueAccessor, Validator,
}
private updatedModel(value: Partial<TimeUnitInputModel>, forceUpdated = false) {
const time = value.time * this.timeIntervalsInSec.get(value.timeUnit);
const time = isDefinedAndNotNull(value.time) ? value.time * this.timeIntervalsInSec.get(value.timeUnit) : null;
if (this.modelValue !== time || forceUpdated) {
this.modelValue = time;
this.propagateChange(time);