fix: ensure brands array serializes correctly when empty
Added ->values() to prevent empty Collection from serializing as {} instead of []
This fixes Alpine.js error when all brands have null hashids
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
'lastOrderDate' => now()->subDays(rand(1, 90))->diffForHumans(),
|
||||
'activeListings' => rand(0, ($brand->products_count ?? 0)),
|
||||
];
|
||||
})),
|
||||
})->values()),
|
||||
|
||||
get filteredBrands() {
|
||||
let filtered = this.brands.filter(brand => {
|
||||
|
||||
Reference in New Issue
Block a user