diff --git a/src/index.js b/src/index.js index a9c17af..83400d9 100644 --- a/src/index.js +++ b/src/index.js @@ -54,7 +54,10 @@ export default class Esqueue extends events.EventEmitter { } registerWorker(type, workerFn, opts) { - const worker = new Worker(this, type, workerFn, opts); + const options = Object.assign({ + doctype: this.settings.doctype, + }, opts); + const worker = new Worker(this, type, workerFn, options); this._workers.push(worker); return worker; }