We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a854267 commit 1ec4e54Copy full SHA for 1ec4e54
packages/compass-data-modeling/src/components/drawer/field-drawer-content.tsx
@@ -74,7 +74,7 @@ export function getIsFieldNameValid(
74
};
75
}
76
77
- const fieldsNamesWithoutCurrent = existingFields
+ const siblingFields = existingFields
78
.filter(
79
(fieldPath) =>
80
fieldPath.length === currentFieldPath.length &&
@@ -86,7 +86,7 @@ export function getIsFieldNameValid(
86
)
87
.map((fieldPath) => fieldPath[fieldPath.length - 1]);
88
89
- const isDuplicate = fieldsNamesWithoutCurrent.some(
+ const isDuplicate = siblingFields.some(
90
(fieldName) => fieldName === trimmedName
91
);
92
0 commit comments