Firestore - collectionChanges function not emitting empty array when not elements present in queried collection
- 主要語言
- TypeScript
- 星號
- 7.8k
- 分支
- 2.2k
- 平均合併
- 22 小時 28 分鐘
- 30 天內合併 PR
- 6
描述
**Angular:**
13.3.11
**Firebase:**
9.8.4
**AngularFire:**
7.4.1
**Other (e.g. Ionic/Cordova, Node, browser, operating system):**
Node: 14.19.0
Maxc OS: 12.3.1
Chrome (latest)
### How to reproduce these conditions
`
const elements = [1,2,3];
`
`
const surveyReferencesQuery = query(
collection(
this.afs,
'surveyReferences'
) as CollectionReference,
where('companyId', 'in', elements)
);`
`
return collectionChanges(
surveyReferencesQuery
).pipe(
tap((c) =>
console.log(
'collectionChanges',
c.map((s) => [
s.type,
s.doc.id,
s.doc.data(),
])
)
)
);`
### Expected behavior
Should emit empty array
### Actual behavior
Not emitting anything until documents in collection
貢獻指南
研究方向
從 collectionChanges 入口點開始,使用空的 surveyReferences 集合重現提供的 Firestore 查詢。將 observable 的初始行為與預期發出空陣列的行為進行比較;當查詢在相符的文件存在之前發出空陣列時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- angular, firebase, typescript
- 領域
- databases
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100