diff --git a/src/components/ItemsList.tsx b/src/components/ItemsList.tsx index 3ef91c1..64de2e2 100644 --- a/src/components/ItemsList.tsx +++ b/src/components/ItemsList.tsx @@ -386,8 +386,15 @@ export function ItemsList({ url }: ItemsListProps) { console.log('Adding property:', property); const normalizedProperty = property.replace('http://www.wikidata.org/prop/', ''); - if (!normalizedProperty || selectedProperties[normalizedProperty]) { - console.log('Property already exists or invalid:', normalizedProperty); + // Check if property is invalid, + if (!normalizedProperty) { + console.log('Property is invalid:', normalizedProperty); + return; + } + + // Check if property is already in customProperties array (visible in UI) + if (customProperties.includes(normalizedProperty)) { + console.log('Property already visible in UI:', normalizedProperty); return; }