File tree Expand file tree Collapse file tree 1 file changed +7
-15
lines changed
lib/drivers/node-mongodb-native Expand file tree Collapse file tree 1 file changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -381,21 +381,13 @@ NativeConnection.prototype._buildEncryptionSchemas = function() {
381381 }
382382 }
383383
384- const schemaMap = Object . entries ( csfleMappings ) . reduce (
385- ( schemaMap , [ namespace , schema ] ) => {
386- schemaMap [ namespace ] = schema . _buildSchemaMap ( ) ;
387- return schemaMap ;
388- } ,
389- { }
390- ) ;
391-
392- const encryptedFieldsMap = Object . entries ( qeMappings ) . reduce (
393- ( encryptedFieldsMap , [ namespace , schema ] ) => {
394- encryptedFieldsMap [ namespace ] = schema . _buildEncryptedFields ( ) ;
395- return encryptedFieldsMap ;
396- } ,
397- { }
398- ) ;
384+ const schemaMap = Object . fromEntries ( Object . entries ( csfleMappings ) . map (
385+ ( [ namespace , schema ] ) => ( [ namespace , schema . _buildSchemaMap ( ) ] )
386+ ) ) ;
387+
388+ const encryptedFieldsMap = Object . fromEntries ( Object . entries ( qeMappings ) . map (
389+ ( [ namespace , schema ] ) => ( [ namespace , schema . _buildEncryptedFields ( ) ] )
390+ ) ) ;
399391
400392 return {
401393 schemaMap, encryptedFieldsMap
You can’t perform that action at this time.
0 commit comments