bug(firestore): `NaN` cannot be set
robingenz opened this issue Β· comments
Plugin(s)
- Analytics
- App
- App Check
- Authentication
- Crashlytics
- Cloud Firestore
- Cloud Messaging
- Cloud Storage
- Performance
- Remote Config
Version
5.4.0
Platform(s)
- Android
- iOS
- Web
Current behavior
The following works on iOS, but not on Android:
await FirebaseFirestore.setDocument({
reference: `samples/1`,
data: {
nan: NaN,
},
});
Expected behavior
It should be possible to set an value to NaN
on Android.
Reproduction
Steps to reproduce
await FirebaseFirestore.setDocument({
reference: `samples/1`,
data: {
nan: NaN,
},
});
Other information
The reason for this behavior is that Capacitor converts NaN
to null
on Android.
Capacitor doctor
π Capacitor Doctor π
Latest Dependencies:
@capacitor/cli: 5.7.0
@capacitor/core: 5.7.0
@capacitor/android: 5.7.0
@capacitor/ios: 5.7.0
Installed Dependencies:
@capacitor/cli: 5.4.2
@capacitor/android: 5.4.2
@capacitor/core: 5.4.2
@capacitor/ios: 5.4.2
[success] iOS looking great! π
[success] Android looking great! π
Before submitting
- I have read and followed the bug report guidelines.
- I have attached links to possibly related issues and discussions.
- I understand that incomplete issues (e.g. without reproduction) are closed.
Waiting for ionic-team/capacitor#7251