Skip to content

Commit 94688d4

Browse files
committed
WIP
1 parent b5137a0 commit 94688d4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Relations/MorphToMany.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,9 @@ public function sync($ids, $detaching = true)
155155
true => $this->parent->{$this->relatedPivotKey} ?: [],
156156
false => $this->parent->{$this->relationName} ?: [],
157157
};
158+
158159
if ($current instanceof Collection) {
159-
$current = collect($this->parseIds($current))->flatten()->toArray();
160+
$current = $this->parseIds($current);
160161
}
161162
}
162163

0 commit comments

Comments
 (0)