minor bug fixes (#110)

This commit is contained in:
UUBulb
2025-01-29 15:07:20 +08:00
committed by GitHub
parent 30ae419cbd
commit 0ba41828dd
3 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ export const NotificationProvider: React.FC<NotificationProviderProps> = ({
if (withNotifier)
(async () => {
try {
const n = await getNotification()
const n = (await getNotification()) || []
const nData = n.map(({ id, name }) => ({ id, name }))
setNotifier(nData)
} catch (error: any) {
+1 -1
View File
@@ -44,7 +44,7 @@ export const ServerProvider: React.FC<ServerProviderProps> = ({
if (withServer)
(async () => {
try {
const s = await getServers()
const s = (await getServers()) || []
const serverData = s.map(({ id, name }) => ({ id, name }))
setServer(serverData)
} catch (error: any) {