fixed ssr badly

This commit is contained in:
Zoe
2023-01-10 21:33:09 -06:00
parent cd76dfc147
commit a30bcfa0a8
6 changed files with 10 additions and 11 deletions

View File

@@ -7,7 +7,7 @@ const route = useRoute()
const server: IChannel = await $fetch(`/api/channels/${route.params.id}`)
const realServer = useGlobalStore().user.servers.find((e) => e.channels.some((el) => el.id == route.params.id))
const realServer = useGlobalStore().user.servers.filter((e) => e.channels.some((el) => el.id == route.params.id))[0]
if (realServer) {
useGlobalStore().addServer(realServer);