Skip to content

Commit a2e3cc2

Browse files
committed
changed check with regard to useAlias
1 parent dae8208 commit a2e3cc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PowerJoins.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ trait PowerJoins
4040
public function scopeJoinRelationship(Builder $query, $relationName, $callback = null, $joinType = 'join', $useAlias = false, bool $disableExtraConditions = false): void
4141
{
4242
$joinType = PowerJoins::$joinMethodsMap[$joinType] ?? $joinType;
43-
$useAlias = $useAlias && !is_string($callback);
43+
$useAlias = is_string($callback) ? false : $useAlias;
4444
$callback = $this->formatJoinCallback($relationName, $callback);
4545

4646
if (is_null($query->getSelect())) {

0 commit comments

Comments
 (0)