Skip to content

Import fails with Cannot use "undefined" as a Firestore value if any field is NaN #688

Open
@arthabus

Description

@arthabus

Expected behavior

Import preserves NaN values and completes the import

Actual behavior

If a document contains NaN values, they are translated to "undefined" which makes firebase import fail

Steps to reproduce the behavior

   let profileData = {
        __collections__:{},
        nanField: parseFloat("sfg"),
    }

    const profileRef = firebase.firestore().doc(`users/${uid}`);
    await firestoreImport(profileData, profileRef)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions