From f0057cb5a30243e86340a0d822e225b5f8793a91 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sun, 11 Jul 2021 14:28:53 +0200 Subject: [PATCH] Fixed a compile error --- shared/js/file/RemoteAvatars.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/shared/js/file/RemoteAvatars.ts b/shared/js/file/RemoteAvatars.ts index ff9ff213..da8db12a 100644 --- a/shared/js/file/RemoteAvatars.ts +++ b/shared/js/file/RemoteAvatars.ts @@ -8,8 +8,7 @@ import { kIPCAvatarChannel, setGlobalAvatarManagerFactory, uniqueId2AvatarId } from "../file/Avatars"; -import {getIpcInstance, IPCChannel} from "../ipc/BrowserIPC"; -import {AppParameters} from "../settings"; +import {IPCChannel} from "../ipc/BrowserIPC"; import {ChannelMessage} from "../ipc/BrowserIPC"; import {guid} from "../crypto/uid"; import { tr } from "tc-shared/i18n/localize"; @@ -144,9 +143,12 @@ class RemoteAvatarManager extends AbstractAvatarManager { handleAvatarEvent(type: string, payload: any) { const avatar = this.knownAvatars.find(e => e.avatarId === payload.avatarId); - if(!avatar) return; + if(!avatar) { + return; + } - avatar.events.fire(type as any, payload, true); + delete payload.type; + avatar.events.fire(type as any, payload); } }