Skip to content

Commit

Permalink
fix: respect $dontVersionable when checking if version should be crea…
Browse files Browse the repository at this point in the history
…ted (#61)
  • Loading branch information
mutschler authored Mar 18, 2024
1 parent 927acf2 commit 3e12aa2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Versionable.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public function shouldBeVersioning(): bool
return call_user_func([$this, 'shouldVersioning']);
}

if ($this->versions()->count() === 0 || Arr::hasAny($this->getDirty(), $this->versionable)) {
if ($this->versions()->count() === 0 || Arr::hasAny($this->getDirty(), array_keys($this->getVersionableAttributes()))) {
return true;
}

Expand Down

0 comments on commit 3e12aa2

Please sign in to comment.