diff --git a/src/lib/components/chat/ShareChatModal.svelte b/src/lib/components/chat/ShareChatModal.svelte index 62d03ed0a..ba53d8b8a 100644 --- a/src/lib/components/chat/ShareChatModal.svelte +++ b/src/lib/components/chat/ShareChatModal.svelte @@ -73,8 +73,10 @@ export let show = false; onMount(async () => { - chat = await getChatById(localStorage.token, $chatId); - console.log(chat); + chatId.subscribe(async (value) => { + chat = await getChatById(localStorage.token, value); + console.log(chat); + }); });