Skip to content

writeResult is undefined when trying to replicate example #917

@wzard

Description

@wzard

I am using firestore in react.
I am trying to replicate the example documentation.
I am able to set the doc with the value provided but function is returning undefined on being fulfilled.

The below code which is taken from documentation here is returning writeResult is undefined.

I am able to successfully write the doc though.
Can anyone check.

let documentRef = firestore.doc('col/doc');

documentRef.set({foo: 'bar'}).then(writeResult => {
  console.log(`Document written at: ${writeResult.writeTime}`);
});

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions