Skip to content

Commit

Permalink
Add extra condition to avoid wrong on clause on MorphTo joins, closes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
sebj54 authored Nov 26, 2024
1 parent a01958a commit 3c1af9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mixins/RelationshipsExtraMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ public function applyNestedCondition()
public function shouldNotApplyExtraCondition()
{
return function ($condition) {
if (isset($condition['column']) && Str::endsWith($condition['column'], '.')) {
if (isset($condition['column']) && ($condition['column'] === '' || Str::endsWith($condition['column'], '.'))) {
return true;
}

Expand Down

0 comments on commit 3c1af9b

Please sign in to comment.