Skip to content

Commit a1bdd4d

Browse files
committed
fix: update fakerArgs and probability handling in validateFakerSchema function
1 parent 70f02bf commit a1bdd4d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/compass-collection/src/modules/collection-tab.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -788,8 +788,8 @@ const validateFakerSchema = (
788788
result[fieldPath] = {
789789
mongoType: fakerMapping.mongoType,
790790
fakerMethod: UNRECOGNIZED_FAKER_METHOD,
791-
fakerArgs: fakerMapping.fakerArgs,
792-
probability: fakerMapping.probability,
791+
fakerArgs: [],
792+
probability: inputSchema[fieldPath].probability,
793793
};
794794
}
795795
} else {
@@ -798,7 +798,7 @@ const validateFakerSchema = (
798798
mongoType: inputSchema[fieldPath].type,
799799
fakerMethod: UNRECOGNIZED_FAKER_METHOD,
800800
fakerArgs: [],
801-
probability: 1,
801+
probability: inputSchema[fieldPath].probability,
802802
};
803803
}
804804
}

0 commit comments

Comments
 (0)