fix: Logic to unset-rating when currentrating is selected (#7182)

This commit is contained in:
Brian Choromanski
2026-03-06 16:45:02 -05:00
committed by GitHub
parent 0ddfd9caaf
commit 5e40fed623

View File

@@ -84,10 +84,14 @@ export default defineNuxtComponent({
});
function updateRating(val?: number) {
if (!isOwnGroup.value || !val) {
if (!isOwnGroup.value) {
return;
}
if (val === userRating.value) {
val = 0;
}
if (!props.emitOnly) {
setRating(props.slug, val || 0, null);
}