Skip to content

Commit 3c1af9b

Browse files
authored
Add extra condition to avoid wrong on clause on MorphTo joins, closes #191 (#192)
1 parent a01958a commit 3c1af9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Mixins/RelationshipsExtraMethods.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ public function applyNestedCondition()
530530
public function shouldNotApplyExtraCondition()
531531
{
532532
return function ($condition) {
533-
if (isset($condition['column']) && Str::endsWith($condition['column'], '.')) {
533+
if (isset($condition['column']) && ($condition['column'] === '' || Str::endsWith($condition['column'], '.'))) {
534534
return true;
535535
}
536536

0 commit comments

Comments
 (0)