Skip to content

Commit 22d0ac0

Browse files
committed
Don't apply constraints when there aren't any
1 parent 29d9611 commit 22d0ac0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Laravel/EloquentBuffer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public static function load(
6262

6363
if ($relation instanceof MorphTo) {
6464
$relation->constrain($constrain);
65-
} else {
65+
} elseif ($constrain) {
6666
reset($constrain)($query);
6767
}
6868
},

0 commit comments

Comments
 (0)