chore(ts): fix errors

This commit is contained in:
Grigorii K. Shartsev 2025-11-30 18:56:31 +01:00
parent 5bbc28b770
commit 86dff7034a
No known key found for this signature in database
3 changed files with 3 additions and 3 deletions

View file

@ -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')
}

View file

@ -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')
}
}

View file

@ -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))
}