fix: 错误的 openUserInfoDialog 参数类型判断

This commit is contained in:
CrescentLeaf
2025-11-16 19:30:36 +08:00
parent d00dfab898
commit 19cfd84e7d
2 changed files with 2 additions and 2 deletions

View File

@@ -112,7 +112,7 @@ export default function App() {
} }
async function openUserInfoDialog(user: User | string) { async function openUserInfoDialog(user: User | string) {
if (user instanceof User) { if (typeof user == 'object') {
setUserInfo(user) setUserInfo(user)
} else { } else {
setUserInfo(await DataCaches.getUserProfile(user)) setUserInfo(await DataCaches.getUserProfile(user))

View File

@@ -112,7 +112,7 @@ export default function AppMobile() {
} }
async function openUserInfoDialog(user: User | string) { async function openUserInfoDialog(user: User | string) {
if (user instanceof User) { if (typeof user == 'object') {
setUserInfo(user) setUserInfo(user)
} else { } else {
setUserInfo(await DataCaches.getUserProfile(user)) setUserInfo(await DataCaches.getUserProfile(user))