Skip to content

Sample appears to have compile errors on deploy #3

Open
@leetworx

Description

@leetworx

Hi there,
I believe I've captured the sample accurately and I'm trying to run it within my existing firebase project before I go and try to create my own functions (new to functions/typescript) - unfortunately, I run into the following message on deploy:

src/index.ts:16:18 - error TS2532: Object is possibly 'undefined'.

16         body: `${puppy.name} is ready for adoption`,
                    ~~~~~

src/index.ts:34:12 - error TS2532: Object is possibly 'undefined'.

34       .doc(order.seller)
              ~~~~~

src/index.ts:43:29 - error TS2532: Object is possibly 'undefined'.

43         body: `you sold a ${order.product} for ${order.total}`,
                               ~~~~~

src/index.ts:43:50 - error TS2532: Object is possibly 'undefined'.

43         body: `you sold a ${order.product} for ${order.total}`,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions