Skip to content

Commit 55cfd12

Browse files
authored
Merge pull request #4 from GentooXativa/master
feat: separated options object to avoid parent object properties
2 parents ccac281 + 77e048f commit 55cfd12

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ module.exports = (options) => {
2222
config.options = {};
2323
}
2424

25+
const options = { ...config.options };
26+
2527
logger.info(`Connecting to ${config.url}`);
2628
try {
27-
client = await MongoClientInstance.connect(config.url, config.options || {});
29+
client = await MongoClientInstance.connect(config.url, options );
2830

2931
return client;
3032
} catch (error) {

0 commit comments

Comments
 (0)