Skip to content

Commit 833fd37

Browse files
committed
nit
1 parent c13f44b commit 833fd37

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/compass-collection/src/components/mock-data-generator-modal/to-simplified-field-info.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ export default function toSimplifiedFieldInfo(
4444
}
4545

4646
function countSeparators(input: string): number {
47-
return input.split('.').length - 1;
47+
return input.split(FIELD_NAME_SEPARATOR).length - 1;
4848
}

packages/compass-collection/src/transform-schema-to-field-info.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ function processNamedField(
180180

181181
if (field.name.includes(FIELD_NAME_SEPARATOR)) {
182182
throw new ProcessSchemaUnsupportedStateError(
183-
`no support for field names that contain a '.' ; field name: '${field.name}'`
183+
`no support for field names that contain a '${FIELD_NAME_SEPARATOR}' ; field name: '${field.name}'`
184184
);
185185
}
186186

@@ -255,7 +255,7 @@ function getMostFrequentType(types: SchemaType[]): SchemaType | null {
255255
* inputs are required to simulate these unlikely errors.
256256
*/
257257
function validateFieldPath(fieldPath: string) {
258-
const parts = fieldPath.split('.');
258+
const parts = fieldPath.split(FIELD_NAME_SEPARATOR);
259259

260260
for (const part of parts) {
261261
if (part === '') {

0 commit comments

Comments
 (0)