Skip to content

Commit

Permalink
Merge pull request #218 from phh/patch-1
Browse files Browse the repository at this point in the history
Fix Deprecation: currentSlug is null
  • Loading branch information
freekmurze authored Dec 13, 2021
2 parents 273b3f8 + d761846 commit 0f5606b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HasTranslatableSlug.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected function generateNonUniqueSlug(): string

$slugGeneratedFromCallable = is_callable($this->slugOptions->generateSlugFrom);
$hasCustomSlug = $this->hasCustomSlugBeenUsed() && ! empty($slug);
$hasNonChangedCustomSlug = ! $slugGeneratedFromCallable && ! $this->slugIsBasedOnTitle() && ! empty($slug);
$hasNonChangedCustomSlug = ! $slugGeneratedFromCallable && ! empty($slug) && ! $this->slugIsBasedOnTitle();

if ($hasCustomSlug || $hasNonChangedCustomSlug) {
$slugString = $slug;
Expand Down

0 comments on commit 0f5606b

Please sign in to comment.