mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 22:43:34 -07:00
fix: cookbook random recipe selector
This commit is contained in:
parent
4744e6371a
commit
480712a06c
1 changed files with 8 additions and 1 deletions
|
@ -414,8 +414,15 @@ export default defineNuxtComponent({
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const seededQuery = computed(() => {
|
||||||
|
return {
|
||||||
|
...props.query,
|
||||||
|
_searchSeed: Date.now().toString()
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
async function navigateRandom() {
|
async function navigateRandom() {
|
||||||
const recipe = await getRandom(props.query, queryFilter.value);
|
const recipe = await getRandom(seededQuery.value, queryFilter.value);
|
||||||
if (!recipe?.slug) {
|
if (!recipe?.slug) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue