fix: mark favorites with isFavorite flag to prevent filter from hiding them
All checks were successful
CI / update (push) Successful in 1m10s
All checks were successful
CI / update (push) Successful in 1m10s
This commit is contained in:
@@ -21,8 +21,14 @@ export const load: PageServerLoad = async ({ fetch, locals, params }) => {
|
|||||||
|
|
||||||
const favorites = await res.json();
|
const favorites = await res.json();
|
||||||
|
|
||||||
|
// Mark all favorites with isFavorite flag for filter compatibility
|
||||||
|
const favoritesWithFlag = favorites.map(recipe => ({
|
||||||
|
...recipe,
|
||||||
|
isFavorite: true
|
||||||
|
}));
|
||||||
|
|
||||||
return {
|
return {
|
||||||
favorites,
|
favorites: favoritesWithFlag,
|
||||||
session
|
session
|
||||||
};
|
};
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user