This commit is contained in:
Ryan Barlow
2026-05-25 20:33:58 +01:00
parent d9fedb6eb2
commit cdc331d8ba
2 changed files with 7 additions and 4 deletions
+4 -3
View File
@@ -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;
+3 -1
View File
@@ -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;
}