Skip to content

defaultCommandHandler bug, adding "undefined" to array of evtsToDispatch #143

@rakamoviz

Description

@rakamoviz

https://github.com/adrai/node-cqrs-domain/blob/4e70105b11a444b02c12f2850c61242b4998361c/lib/defaultCommandHandler.js#L896

There should be a check like this: rakamoviz@99fbc06 in order to avoid "undefined" getting pushed to evtsToDispatch

That happens when stream.eventsToDispatch is "undefined"; and stream.eventsToDispatch is "undefined" when you have eventPublisher attached to the eventstore: https://github.com/adrai/node-eventstore#async-interface

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions