mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-06-06 01:21:39 +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,
|
// 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
|
// so we need to respect the maximum delay that has
|
||||||
// been passed
|
// 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(
|
throw new InternalInconsistencyError(
|
||||||
'No delay specified in scheduledApply',
|
'No delay specified in scheduledApply',
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user