angular / angular/angularfire

Firestore - collectionChanges function not emitting empty array when not elements present in queried collection

オープン
#3,242 コメント 6 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
7.8k
フォーク
2.2k
平均マージ
22時間 28分
マージ済み PR(30日)
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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。