fix(desktop): fix default view in feed form

This commit is contained in:
Stephen Zhou 2025-05-14 19:21:16 +08:00
parent 9b0691aacf
commit bf26a3eabc
No known key found for this signature in database
1 changed files with 5 additions and 1 deletions

View File

@ -209,7 +209,11 @@ const FeedInnerForm = ({
}, [subscription])
useEffect(() => {
if (analytics?.view !== undefined && !subscription && defaultValues?.view === undefined) {
if (
typeof analytics?.view === "number" &&
!subscription &&
typeof defaultValues?.view !== "number"
) {
form.setValue("view", `${analytics.view}`)
}
}, [analytics, subscription, defaultValues?.view])