How can I fix Timestamp.toDate() returning "undefined is not an object" even when I explicitly define to only check for that value if the Timestamp isn't null? #6032
-
Beta Was this translation helpful? Give feedback.
Answered by
andersonaddo
Jan 26, 2022
Replies: 1 comment
-
If what you're saying is true, selectedImage is undefined and time and time.toDate() would be erroneous However, your error says something else. It's complaining that time is undefined, not selectedImage. It looks like you're not properly understanding the data flow of your app. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
andersonaddo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If what you're saying is true, selectedImage is undefined and time and time.toDate() would be erroneous
null
andundefined
are very different.However, your error says something else. It's complaining that time is undefined, not selectedImage. It looks like you're not properly understanding the data flow of your app.