File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -60,17 +60,18 @@ module.exports = function(store) {
60
60
61
61
} ;
62
62
63
- store . onQuery = function ( collectionName , source , cb ) {
63
+ store . onQuery = function ( collectionName , cb ) {
64
64
return this . shareClient . use ( 'query' , function ( shareRequest , next ) {
65
65
var session ;
66
- if ( shareRequest . options . backend !== source ) {
67
- return next ( ) ;
68
- }
66
+
69
67
session = shareRequest . agent . connectSession ;
70
- shareRequest . query = deepCopy ( shareRequest . query ) ;
68
+
71
69
if ( collectionName === '*' ) {
72
70
return cb ( shareRequest . collection , shareRequest . query , session , next ) ;
73
71
} else {
72
+ if ( shareRequest . collection !== collectionName ) {
73
+ return next ( ) ;
74
+ }
74
75
return cb ( shareRequest . query , session , next ) ;
75
76
}
76
77
} ) ;
@@ -101,4 +102,4 @@ function lookup(segments, doc) {
101
102
}
102
103
}
103
104
return curr ;
104
- } ;
105
+ } ;
You can’t perform that action at this time.
0 commit comments