mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 17:46:46 +00:00
fixed
This commit is contained in:
+6
-6
@@ -162,12 +162,12 @@ class Client {
|
||||
const TerritoryModal = document.querySelector(
|
||||
"territory-patterns-input",
|
||||
) as territoryPatternsModal;
|
||||
const tpButton = document.getElementById("territory-patterns-input_");
|
||||
TerritoryModal instanceof territoryPatternsModal;
|
||||
document
|
||||
.getElementById("territory-patterns-input_")
|
||||
.addEventListener("click", () => {
|
||||
TerritoryModal.open();
|
||||
});
|
||||
if (tpButton === null) throw new Error("Missing territory-patterns-input_");
|
||||
tpButton.addEventListener("click", () => {
|
||||
TerritoryModal.open();
|
||||
});
|
||||
|
||||
const claims = isLoggedIn();
|
||||
if (claims === false) {
|
||||
@@ -288,7 +288,7 @@ class Client {
|
||||
{
|
||||
gameID: lobby.gameID,
|
||||
serverConfig: config,
|
||||
pattern: localStorage.getItem("territoryPattern"),
|
||||
pattern: localStorage.getItem("territoryPattern") ?? "",
|
||||
flag:
|
||||
this.flagInput === null || this.flagInput.getCurrentFlag() === "xx"
|
||||
? ""
|
||||
|
||||
@@ -302,7 +302,7 @@ export class PlayerInfo {
|
||||
public readonly clan: string | null;
|
||||
|
||||
constructor(
|
||||
public readonly pattern: string | undefined,
|
||||
public readonly pattern: string | null | undefined,
|
||||
public readonly flag: string | undefined,
|
||||
public readonly name: string,
|
||||
public readonly playerType: PlayerType,
|
||||
|
||||
@@ -174,7 +174,7 @@ export class PlayerView {
|
||||
return this.data.flag;
|
||||
}
|
||||
|
||||
pattern(): string {
|
||||
pattern(): string | undefined | null {
|
||||
return this.data.pattern;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -57,5 +57,5 @@ export async function setup(
|
||||
}
|
||||
|
||||
export function playerInfo(name: string, type: PlayerType): PlayerInfo {
|
||||
return new PlayerInfo("fr", name, type, null, name);
|
||||
return new PlayerInfo(null, "fr", name, type, null, name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user