Commit 7c17fd77 authored by nanahira's avatar nanahira

allow empty constructor

parent 098c4320
......@@ -95,7 +95,7 @@ export class WorkflowDispatcher<F extends (...args: any[]) => Promise<any>> {
workersOrPromises: Array<F | Promise<F>>,
options: DispatcherOptions = {},
) {
if (!workersOrPromises?.length) throw new Error('workers cannot be empty');
// if (!workersOrPromises?.length) throw new Error('workers cannot be empty');
this.maxAttempts = options.maxAttempts ?? 3;
this.backoffBaseMs = options.backoffBaseMs ?? 1000;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment