Skip to content
Browse files

## v0.5.2

  • Loading branch information...
1 parent 4be4c8b commit 3fd1317577914ff9591ef20b3cfe1fae20fd2ee0 @adrai committed
Showing with 10 additions and 2 deletions.
  1. +4 −0 README.md
  2. +5 −1 lib/commandDispatcher.js
  3. +1 −1 package.json
View
4 README.md
@@ -78,6 +78,10 @@ See [tests](https://github.com/adrai/node-cqrs-domain/tree/master/test) for deta
# Release Notes
+## v0.5.2
+
+- fix commandDispatcher if no commandqueue is used
+
## v0.5.0
- a complete change of validation rules (see new [rule-validator](https://github.com/adrai/rule-validator))
View
6 lib/commandDispatcher.js
@@ -72,7 +72,11 @@ module.exports = {
// use provided aggregateId or get one from commandQueue
function(callback) {
if (!commandQueue) {
- return callback(null, uuid().toString());
+ if (cmd.payload && cmd.payload.id) {
+ return callback(null, cmd.payload.id);
+ } else {
+ return callback(null, uuid().toString());
+ }
}
if (options.forcedQueuing) {
View
2 package.json
@@ -1,7 +1,7 @@
{
"author": "adrai",
"name": "cqrs-domain",
- "version": "0.5.1",
+ "version": "0.5.2",
"private": false,
"main": "index.js",
"engines": {

0 comments on commit 3fd1317

Please sign in to comment.
Something went wrong with that request. Please try again.