Skip to content

Commit 0f37c75

Browse files
authored
Merge pull request veliovgroup#222 from exKAZUu/dev
Fix veliovgroup#210 again.
2 parents 3ea2db4 + cefdbb0 commit 0f37c75

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Diff for: files.coffee

+5-2
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,7 @@ class FilesCollection
14431443
check selector, Match.Optional Match.OneOf Object, String, Boolean, null
14441444
check options, Match.Optional Object
14451445

1446+
selector = {} unless arguments.length
14461447
doc = @collection.findOne selector, options
14471448
return if doc then new FileCursor(doc, @) else doc
14481449

@@ -1455,10 +1456,12 @@ class FilesCollection
14551456
@summary Find and return Cursor for matching documents
14561457
@returns {FilesCursor} Instance
14571458
###
1458-
find: (selector = {}, options) ->
1459+
find: (selector, options) ->
14591460
console.info "[FilesCollection] [find(#{JSON.stringify(selector)}, #{JSON.stringify(options)})]" if @debug
1460-
check selector, Match.OneOf Object, String
1461+
check selector, Match.OneOf Object, String, null
14611462
check options, Match.Optional Object
1463+
1464+
selector = {} unless arguments.length
14621465
return new FilesCursor selector, options, @
14631466

14641467
###

0 commit comments

Comments
 (0)