mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-29 03:44:40 +00:00
Update src/client/graphics/layers/PlayerPanel.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user