Skip to content

Commit 54dc86b

Browse files
committed
fix: channot select server bug
1 parent 2e2de46 commit 54dc86b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

www/components/frpc_card.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ export const FRPCFormCard: React.FC<FRPCFormCardProps> = ({
6767
useEffect(() => {
6868
if (paramClientID) {
6969
setClientID(paramClientID)
70-
setServerID(client?.client?.serverId)
70+
if (client?.client?.serverId) {
71+
setServerID(client?.client?.serverId)
72+
}
7173
}
7274

7375
if (!client || !client?.client || !client?.client?.config) return
@@ -79,7 +81,7 @@ export const FRPCFormCard: React.FC<FRPCFormCardProps> = ({
7981
}, [paramClientID])
8082

8183
useEffect(() => {
82-
if (clientID) {
84+
if (clientID && client?.client?.serverId) {
8385
setServerID(client?.client?.serverId)
8486
}
8587
}, [clientID, paramClientID, client])

0 commit comments

Comments
 (0)