[O] Check if already linked

This commit is contained in:
Azalea
2024-02-22 12:30:28 -05:00
parent 2cbad36f80
commit dbc54b016c

View File

@@ -41,6 +41,13 @@
console.log("linking card", id)
// Check if this card is already linked in the account
if (me?.cards?.some(c => formatLUID(c.luid).toLowerCase() === id.toLowerCase())) {
setError("This card is already linked to your account", type)
state = "ready"
return
}
// First, lookup the card summary
const card = (await CARD.summary(id).catch(e => {
// If card is not found,