Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
hans-thomas committed Nov 29, 2023
1 parent b5137a0 commit 94688d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Relations/MorphToMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ public function sync($ids, $detaching = true)
true => $this->parent->{$this->relatedPivotKey} ?: [],
false => $this->parent->{$this->relationName} ?: [],
};

if ($current instanceof Collection) {
$current = collect($this->parseIds($current))->flatten()->toArray();
$current = $this->parseIds($current);
}
}

Expand Down

0 comments on commit 94688d4

Please sign in to comment.