mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-23 15:32:24 +00:00
Merge pull request #1466 from balena-io/1428-patch-variable-is-set
Correctly evaluate if scheduledApply.delay is not set
This commit is contained in:
commit
eaff2ac801
@ -854,7 +854,10 @@ export function triggerApplyTarget({
|
||||
// If a delay has been set it's because we need to hold off before applying again,
|
||||
// so we need to respect the maximum delay that has
|
||||
// been passed
|
||||
if (!scheduledApply.delay) {
|
||||
if (scheduledApply.delay === undefined || isNaN(scheduledApply.delay)) {
|
||||
log.debug(
|
||||
`Tried to apply target with invalid delay: ${scheduledApply.delay}`,
|
||||
);
|
||||
throw new InternalInconsistencyError(
|
||||
'No delay specified in scheduledApply',
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user