Skip to content

Creating action with undefined payload converts to {} #47

Description

@mischkl

I just ran into this issue after upgrading to 2.x, which has caused a serious bug in our application.

Using an action creator without specifying a payload, for an action that expects a payload (created with typeOf), results in the payload being "autogenerated" as the empty object {}. This is a serious issue because sometimes we want to pass on the fact that there is no value being passed.

We managed to work around the issue by converting to null when calling the action creator, e.g. MyActionType.DoSomething(value || null). However this seems to be an unnecessary burden for developers to always have to do this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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