Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fix revision from history

  • Loading branch information...
commit 00b84472186de5aaa1c48af237d169d89323e598 1 parent 7247d4a
authored December 05, 2012
4  lib/bases/aggregateBase.js
@@ -71,6 +71,10 @@ Aggregate.prototype = {
71 71
 
72 72
         _.each(historyEvents, function(evt) {
73 73
             self[evt.event](evt.payload);
  74
+
  75
+            if (self.attributes.revision < evt.head.revision) {
  76
+                self.attributes.revision = evt.head.revision;
  77
+            }
74 78
         });
75 79
 
76 80
         this.previousAttributes = this.toJSON();
2  package.json
... ...
@@ -1,7 +1,7 @@
1 1
 {
2 2
   "author": "adrai",
3 3
   "name": "cqrs-domain",
4  
-  "version": "0.3.3",
  4
+  "version": "0.3.4",
5 5
   "private": false,
6 6
   "main": "index.js",
7 7
   "engines": {

0 notes on commit 00b8447

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