mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-04-12 16:05:35 -04:00
fix: Logic to unset-rating when currentrating is selected (#7182)
This commit is contained in:
committed by
GitHub
parent
0ddfd9caaf
commit
5e40fed623
@@ -84,10 +84,14 @@ export default defineNuxtComponent({
|
|||||||
});
|
});
|
||||||
|
|
||||||
function updateRating(val?: number) {
|
function updateRating(val?: number) {
|
||||||
if (!isOwnGroup.value || !val) {
|
if (!isOwnGroup.value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (val === userRating.value) {
|
||||||
|
val = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!props.emitOnly) {
|
if (!props.emitOnly) {
|
||||||
setRating(props.slug, val || 0, null);
|
setRating(props.slug, val || 0, null);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user