Prevent undefined errors
This commit is contained in:
parent
320db9f8b7
commit
33c84f7a08
|
@ -50,7 +50,7 @@ export class SimpleJob<R extends JobResult> {
|
|||
|
||||
try {
|
||||
const jobResult = await this.runCallback();
|
||||
if (jobResult.shouldBackoff) {
|
||||
if (jobResult && jobResult.shouldBackoff) {
|
||||
this.intervalSec = Math.min(
|
||||
this.config.maxItervalSec,
|
||||
this.intervalSec * this.config.backoffMultiplier,
|
||||
|
|
Loading…
Reference in a new issue