We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 72e55b7 commit d057fd4Copy full SHA for d057fd4
1 file changed
packages/core/lib/queues/MessageSchemaContainer.ts
@@ -13,7 +13,7 @@ export class MessageSchemaContainer<MessagePayloadSchemas extends object> {
13
private readonly messageTypeField?: string
14
15
constructor(options: MessageSchemaContainerOptions<MessagePayloadSchemas>) {
16
- if (options.messageTypeField === undefined && options.messageSchemas.length === 1) {
+ if (options.messageTypeField === undefined && options.messageSchemas.length > 1) {
17
throw new Error(
18
'if messageTypeField is not provided, messageSchemas must have a single schema',
19
)
0 commit comments