Skip to content

Return rejected promises #106

@Sicria

Description

@Sicria

After updating from 5.3.0 > 5.6.0 the decorator now does not return the value of a promise.

@track(props => ({
  action: 'FormSubmit',
  label: props.name || null,
}))
handleSubmit = values => this.props.onSubmit(values).then(() => {}, err => err);

The onSubmit function above returns a promise which returns an error to display submission errors via react-final-form. If the decorator is used this error does not get reported as the value isn't passed through.

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