Skip to content

28:3 warning Arrow function expected no return value consistent-return #2

@StefTriv71

Description

@StefTriv71

Hello,

I've used your example before with Angular 5, but I am now using it again with Angular 6 (using reactive forms) and your updated code and libraries.

I keep getting this error via firebase functions:

28:3 warning Arrow function expected no return value consistent-return

It is in reference to this line of code:

return mailTransport.sendMail(mailOptions).then(() => { return console.log('Mail sent'); //The log will be shown in Firebase. });

I noticed since you later return a promise, you need to return a value here a swell. e.g. false, but I tried doing this, but it still does not work:

if (change.before.val() || !dataAfterChange.name) { return false; }

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