Skip to content

Commit

Permalink
add null check
Browse files Browse the repository at this point in the history
  • Loading branch information
DirtyRacer1337 committed Jun 21, 2024
1 parent 038c1ba commit 15b7198
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/MediaCollections/Models/Concerns/IsSorted.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public static function setNewOrder(array $ids, int $startOrder = 1): void
{
foreach ($ids as $id) {
$model = static::find($id);
if (!$model) {
continue;
}

$orderColumnName = $model->determineOrderColumnName();

Expand Down

0 comments on commit 15b7198

Please sign in to comment.