File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
packages/firestore/lib/pipelines Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -499,10 +499,20 @@ class RuntimePipelineImpl<T = DocumentData> implements RuntimePipeline {
499499 selectableOrOptions : Selectable | PipelineUnnestOptions ,
500500 indexField ?: string ,
501501 ) : Pipeline < T > {
502- if (
502+ const isOptionsObject =
503503 isRecord ( selectableOrOptions ) &&
504- hasAnyKey ( selectableOrOptions , [ 'selectable' , 'indexField' ] )
505- ) {
504+ ( Object . prototype . hasOwnProperty . call ( selectableOrOptions , 'indexField' ) ||
505+ ( Object . prototype . hasOwnProperty . call ( selectableOrOptions , 'selectable' ) &&
506+ ! hasAnyKey ( selectableOrOptions , [
507+ '__kind' ,
508+ 'exprType' ,
509+ 'path' ,
510+ 'name' ,
511+ 'args' ,
512+ 'alias' ,
513+ ] ) ) ) ;
514+
515+ if ( isOptionsObject ) {
506516 return this . append ( 'unnest' , selectableOrOptions as Record < string , unknown > ) ;
507517 }
508518
You can’t perform that action at this time.
0 commit comments