From 86dff7034afc3484baf9684608aaec97ffb567fe Mon Sep 17 00:00:00 2001 From: "Grigorii K. Shartsev" Date: Sun, 30 Nov 2025 18:56:31 +0100 Subject: [PATCH] chore(ts): fix errors --- .../RightSidebar/SearchMessages/SearchMessagesTab.vue | 2 +- src/components/RightSidebar/Threads/ThreadsTab.vue | 2 +- src/components/UIShared/ConversationActionsShortcut.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/RightSidebar/SearchMessages/SearchMessagesTab.vue b/src/components/RightSidebar/SearchMessages/SearchMessagesTab.vue index 70efaa74b9..a892be9a9c 100644 --- a/src/components/RightSidebar/SearchMessages/SearchMessagesTab.vue +++ b/src/components/RightSidebar/SearchMessages/SearchMessagesTab.vue @@ -105,7 +105,7 @@ onBeforeUnmount(() => { * @param payload.to */ function onRouteChange({ from, to }: { from: RouteLocation, to: RouteLocation }): void { - if (to.name !== 'conversation' || from.params.token !== to.params.token || (to.hash && isInCall.value)) { + if (to.name !== 'conversation' || ('token' in from.params && from.params.token !== to.params.token) || (to.hash && isInCall.value)) { abortSearch() emit('close') } diff --git a/src/components/RightSidebar/Threads/ThreadsTab.vue b/src/components/RightSidebar/Threads/ThreadsTab.vue index 38edddbafc..520c54d778 100644 --- a/src/components/RightSidebar/Threads/ThreadsTab.vue +++ b/src/components/RightSidebar/Threads/ThreadsTab.vue @@ -37,7 +37,7 @@ onBeforeUnmount(() => { * @param payload.to */ function onRouteChange({ from, to }: { from: RouteLocation, to: RouteLocation }): void { - if (to.name !== 'conversation' || from.params.token !== to.params.token || (from.query.threadId !== to.query.threadId && isInCall.value)) { + if (to.name !== 'conversation' || ('token' in from.params && from.params.token !== to.params.token) || (from.query.threadId !== to.query.threadId && isInCall.value)) { emit('close') } } diff --git a/src/components/UIShared/ConversationActionsShortcut.vue b/src/components/UIShared/ConversationActionsShortcut.vue index 0369b3b0ae..cf84e59083 100644 --- a/src/components/UIShared/ConversationActionsShortcut.vue +++ b/src/components/UIShared/ConversationActionsShortcut.vue @@ -61,7 +61,7 @@ const descriptionLabel = computed(() => { */ async function deleteEventConversation() { try { - if (route?.params?.token === props.token) { + if ('token' in route.params && route.params.token === props.token) { await router.push({ name: 'root' }) .catch((failure) => !isNavigationFailure(failure, NavigationFailureType.duplicated) && Promise.reject(failure)) }