Update src/client/graphics/layers/PlayerPanel.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Restart2008
2025-12-24 14:21:43 -08:00
committed by GitHub
parent 17231ff0e6
commit 5c0f5abc18
+6 -1
View File
@@ -278,7 +278,12 @@ export class PlayerPanel extends LitElement implements Layer {
private handleKickClick(e: Event, other: PlayerView) {
e.stopPropagation();
this.eventBus.emit(new SendKickPlayerIntentEvent(other.clientID()!));
const targetClientID = other.clientID();
if (!targetClientID) {
console.warn("Cannot kick player without clientID");
return;
}
this.eventBus.emit(new SendKickPlayerIntentEvent(targetClientID));
this.hide();
}