reactivity+
This commit is contained in:
parent
dfb2b17116
commit
b0b7cf424d
|
@ -34,7 +34,9 @@ export const RatingControl = (props: RatingControlProps) => {
|
||||||
on(
|
on(
|
||||||
() => props.comment,
|
() => props.comment,
|
||||||
(comment) => {
|
(comment) => {
|
||||||
setTotal(comment?.stat?.rating || 0)
|
if (comment) {
|
||||||
|
setTotal(comment?.stat?.rating)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{ defer: true },
|
{ defer: true },
|
||||||
),
|
),
|
||||||
|
@ -44,7 +46,9 @@ export const RatingControl = (props: RatingControlProps) => {
|
||||||
on(
|
on(
|
||||||
() => props.shout,
|
() => props.shout,
|
||||||
(shout) => {
|
(shout) => {
|
||||||
setTotal(shout?.stat?.rating || 0)
|
if (shout) {
|
||||||
|
setTotal(shout?.stat?.rating)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{ defer: true },
|
{ defer: true },
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user