Skip to content

Commit ed2afd5

Browse files
committed
chore: update demo
1 parent 6b44588 commit ed2afd5

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

apps/demo/src/plugin-demos/firebase-firestore.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,37 @@ export class DemoModel extends DemoSharedFirebaseFirestore {
1414
}
1515

1616
testIt(): void {
17+
this.issue_51();
1718
Promise.all([this.init(), this.invalid_field_path()]);
1819
}
1920

21+
issue_51() {
22+
const doc = firebase().firestore().collection('users').doc('0Myq8dlF1dQtC7tX4WlA');
23+
24+
doc.onSnapshot({
25+
next(snapshot) {
26+
console.log('onSnapshot', 'object');
27+
},
28+
});
29+
30+
doc.onSnapshot(
31+
{ includeMetadataChanges: true },
32+
{
33+
next(snapshot) {
34+
console.log('onSnapshot', 'options', '&', 'object');
35+
},
36+
}
37+
);
38+
39+
doc.onSnapshot((doc) => {
40+
console.log('onSnapshot', '&', 'function');
41+
});
42+
43+
doc.onSnapshot({ includeMetadataChanges: true }, (doc) => {
44+
console.log('onSnapshot', 'options', '&', 'function');
45+
});
46+
}
47+
2048
async init() {
2149
firebase()
2250
.firestore()

0 commit comments

Comments
 (0)