Skip to content

Commit c3605ba

Browse files
authored
fix: fix sortByCollator collection macro return keys (monicahq/chandler#556)
Fix to `sortByCollator` collection macro Prevents results from being conformed to an object via Inertia rendering
1 parent a79310e commit c3605ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Helpers/CollectionHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static function sortByCollator(Collection $collect, callable|string $call
3737
$results[$key] = $collect->get($key);
3838
}
3939

40-
return new Collection($results);
40+
return new Collection(array_values($results));
4141
}
4242

4343
/**

0 commit comments

Comments
 (0)