Skip to content

Commit 84d04e3

Browse files
committed
RUBY-1082 Adjust logic
1 parent 370d748 commit 84d04e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/mongo/grid/stream/write.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ def files_collection
157157
end
158158

159159
def with_write_concern(collection)
160-
if write_concern.nil? || collection.write_concern.nil? ||
161-
collection.write_concern.options == write_concern.options
160+
if write_concern.nil? || (collection.write_concern &&
161+
collection.write_concern.options == write_concern.options)
162162
collection
163163
else
164164
collection.client.with(write: write_concern.options)[collection.name]

0 commit comments

Comments
 (0)