File tree 1 file changed +20
-12
lines changed
1 file changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -17,20 +17,28 @@ function MyFeed() {
17
17
setPosts (
18
18
snapshot . docs
19
19
. filter ( function ( doc ) {
20
- /* debug console */
21
- console . log (
22
- doc . data ( ) . user . email === currentUser . email ,
23
- doc . data ( ) . user . email ,
24
- "===" ,
25
- currentUser . email ,
26
- doc . data ( ) . user . display === currentUser . display ,
27
- doc . data ( ) . user . display ,
28
- "===" ,
29
- currentUser . display
30
- ) ;
31
20
/* debug console */
32
- if ( doc . data ( ) . user . email === currentUser . email ) {
21
+ // console.log(
22
+ // doc.data().user.email === currentUser.email,
23
+ // doc.data().user.email,
24
+ // "===",
25
+ // currentUser.email,
26
+ // doc.data().user.display === currentUser.display,
27
+ // doc.data().user.display,
28
+ // "===",
29
+ // currentUser.display
30
+ // );
31
+ /* debug console */
32
+ if (
33
+ doc . data ( ) . user . email === undefined || doc . data ( ) . user . email === null
34
+ ) {
35
+ return false ;
36
+ } else if ( doc . data ( ) . user . email === currentUser . email ) {
33
37
return true ;
38
+ } else if (
39
+ doc . data ( ) . user . display === undefined || doc . data ( ) . user . display === null
40
+ ) {
41
+ return false ;
34
42
} else if ( doc . data ( ) . user . display === currentUser . display ) {
35
43
return true ;
36
44
} else {
You can’t perform that action at this time.
0 commit comments