mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-05 18:34:09 +00:00
fix(ci): pass only tag names to the tag key mapper
Use an explicit single-argument callback for tag arrays so the mapper cannot receive an index or array from map.
This commit is contained in:
@@ -93,7 +93,7 @@ export function TripTagField({
|
||||
const [active, setActive] = useState(false);
|
||||
const [highlighted, setHighlighted] = useState(-1);
|
||||
const [options, setOptions] = useState<string[]>([]);
|
||||
const selected = new Set(tags.map(tripTagKey));
|
||||
const selected = new Set(tags.map((tag) => tripTagKey(tag)));
|
||||
const draftKey = tripTagKey(draft);
|
||||
const atLimit = tags.length >= MAX_TRIP_TAGS;
|
||||
const canAdd = !atLimit && draftKey.length > 0 && !selected.has(draftKey);
|
||||
|
||||
Reference in New Issue
Block a user