Skip to content

Commit 75d8a6d

Browse files
committed
Merge branch '2.0' into 3.2-features
2 parents c7ee675 + b249aae commit 75d8a6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/gridfs/grid_store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ var GridStore = function GridStore(db, id, filename, mode, options) {
127127
// Set the root if overridden
128128
this.root = this.options['root'] == null ? GridStore.DEFAULT_ROOT_COLLECTION : this.options['root'];
129129
this.position = 0;
130-
this.readPreference = this.options.readPreference || ReadPreference.PRIMARY;
130+
this.readPreference = this.options.readPreference || db.options.readPreference || ReadPreference.PRIMARY;
131131
this.writeConcern = _getWriteConcern(db, this.options);
132132
// Set default chunk size
133133
this.internalChunkSize = this.options['chunkSize'] == null ? Chunk.DEFAULT_CHUNK_SIZE : this.options['chunkSize'];

0 commit comments

Comments
 (0)