File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -637,15 +637,15 @@ handle.$or = createLogicalQueryOperatorHandler('$or');
637
637
handle . $and = createLogicalQueryOperatorHandler ( '$and' ) ;
638
638
handle . $nor = createLogicalQueryOperatorHandler ( '$nor' ) ;
639
639
640
- function createLogicalQueryOperatorHandler ( op ) {
641
- return function logicalQueryOperatorHandler ( val ) {
640
+ function createLogicalQueryOperatorHandler ( op , context ) {
641
+ return function logicalQueryOperatorHandler ( val , context ) {
642
642
if ( ! Array . isArray ( val ) ) {
643
643
throw new TypeError ( 'conditional ' + op + ' requires an array' ) ;
644
644
}
645
645
646
646
const ret = [ ] ;
647
647
for ( const obj of val ) {
648
- ret . push ( cast ( this . casterConstructor . schema , obj , null , this && this . $$context ) ) ;
648
+ ret . push ( cast ( this . casterConstructor . schema ?? context . schema , obj , null , this && this . $$context ) ) ;
649
649
}
650
650
651
651
return ret ;
You can’t perform that action at this time.
0 commit comments