Fixed a compile error

master
WolverinDEV 2021-07-11 14:28:53 +02:00
parent d99314895a
commit f0057cb5a3
1 changed files with 6 additions and 4 deletions

View File

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