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