Skip to content

Commit

Permalink
Merge pull request #21 from geoffbeaumont/master
Browse files Browse the repository at this point in the history
Fix new version when touched by related model #11
  • Loading branch information
mpociot authored Oct 6, 2016
2 parents eee7b9b + 8d5a3b5 commit 66cf178
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mpociot/Versionable/VersionableTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ protected function versionablePostSave()
*/
if (
( $this->versioningEnabled === true && $this->updating && $this->isValidForVersioning() ) ||
( $this->versioningEnabled === true && !$this->updating )
( $this->versioningEnabled === true && !$this->updating && count($this->versionableDirtyData))
) {
// Save a new version
$version = new Version();
Expand Down

0 comments on commit 66cf178

Please sign in to comment.