mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 15:30:43 +00:00
update
This commit is contained in:
@@ -131,10 +131,11 @@ export class ClanTagInput extends LitElement {
|
||||
this.checkCounter++;
|
||||
|
||||
if (!result.isValid || tag.length === 0) {
|
||||
// Nothing to ask the server about — clear any old ownership error,
|
||||
// and remember the cleared/short value across reloads.
|
||||
// Nothing to ask the server about — clear any old ownership error
|
||||
// and wipe the stored tag so a reload doesn't restore a stale value
|
||||
// that no longer matches the current (invalid/empty) input.
|
||||
this.ownershipError = "";
|
||||
if (result.isValid) localStorage.setItem(clanTagKey, "");
|
||||
localStorage.setItem(clanTagKey, "");
|
||||
} else {
|
||||
this.checkTimer = setTimeout(() => {
|
||||
this.checkTimer = null;
|
||||
|
||||
@@ -473,12 +473,14 @@ export async function startWorker() {
|
||||
: [],
|
||||
);
|
||||
if (!userClanTags.has(resolvedClanTag.toUpperCase())) {
|
||||
// Fail closed: inconclusive (null) means drop, not keep.
|
||||
const exists = await clanExistsByTag(resolvedClanTag);
|
||||
if (exists === true) {
|
||||
if (exists !== false) {
|
||||
log.warn("Dropped clan tag: player is not a member", {
|
||||
persistentID: persistentId,
|
||||
gameID: clientMsg.gameID,
|
||||
clanTag: resolvedClanTag,
|
||||
existsResult: exists,
|
||||
});
|
||||
resolvedClanTag = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user