@@ -1443,6 +1443,7 @@ class FilesCollection
1443
1443
check selector, Match .Optional Match .OneOf Object , String , Boolean , null
1444
1444
check options, Match .Optional Object
1445
1445
1446
+ selector = {} unless arguments .length
1446
1447
doc = @collection .findOne selector, options
1447
1448
return if doc then new FileCursor (doc, @ ) else doc
1448
1449
@@ -1455,10 +1456,12 @@ class FilesCollection
1455
1456
@summary Find and return Cursor for matching documents
1456
1457
@returns {FilesCursor} Instance
1457
1458
###
1458
- find : (selector = {} , options ) ->
1459
+ find : (selector , options ) ->
1459
1460
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
1461
1462
check options, Match .Optional Object
1463
+
1464
+ selector = {} unless arguments .length
1462
1465
return new FilesCursor selector, options, @
1463
1466
1464
1467
###
0 commit comments