We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cbb4724 commit aba3a18Copy full SHA for aba3a18
lib/parser/serializer.js
@@ -786,7 +786,7 @@ function serializeInto(
786
const type = typeof value;
787
788
// Check the key and throw error if it's illegal
789
- if (!ignoreKeys.has(key)) {
+ if (typeof key === 'string' && !ignoreKeys.has(key)) {
790
if (key.match(regexp) != null) {
791
// The BSON spec doesn't allow keys with null bytes because keys are
792
// null-terminated.
@@ -886,7 +886,7 @@ function serializeInto(
886
887
888
889
890
891
892
0 commit comments