You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our project we actively use withConverter. Some of converters sometimes returns undefined when they see logically null value. It worked fine in version 8.10.1
After update to the 10.5.0 version with compat enabled we are getting exceptions on reading data() from the elements of the collection.
It does not happen when document is accessed directly by it's path.
Drive-by comment: This looks like a legitimate bug to me. It appears that the code that the customer linked to fails to take into account that the undefined result may be coming from a converter, in which case undefined is a completely valid return value. A valid fix may be to simply change the assertion from data !== undefined to data !== undefined || this._delegate.converter (note: untested code -- may not compile)
Operating System
MacOS
Browser Version
Chrome 117.0.5938.149
Firebase SDK Version
10.5.0
Firebase SDK Product:
Firestore
Describe your project's tooling
Next.js app
Describe the problem
In our project we actively use withConverter. Some of converters sometimes returns undefined when they see logically null value. It worked fine in version 8.10.1
After update to the 10.5.0 version with compat enabled we are getting exceptions on reading
data()
from the elements of the collection.It does not happen when document is accessed directly by it's path.
Error comes from this code:
https://github.com/firebase/firebase-js-sdk/blob/master/packages/firestore-compat/src/api/database.ts#L975
Steps and code to reproduce issue
The text was updated successfully, but these errors were encountered: