diff --git a/packages/api/src/queueAdapters/bullMQ.ts b/packages/api/src/queueAdapters/bullMQ.ts index 6e21523f..da218ac7 100644 --- a/packages/api/src/queueAdapters/bullMQ.ts +++ b/packages/api/src/queueAdapters/bullMQ.ts @@ -14,7 +14,9 @@ export class BullMQAdapter extends BaseAdapter { constructor(private queue: Queue, options: Partial = {}) { const libName = 'bullmq'; super(libName, options); - if (!(queue instanceof Queue) || !(queue.metaValues?.version as string)?.startsWith(libName)) { + if ( + !(queue instanceof Queue || `${(queue as Queue).metaValues?.version}`?.startsWith(libName)) + ) { throw new Error(`You've used the BullMQ adapter with a non-BullMQ queue.`); } }