Skip to content

createActions works incorrectly with Action Definitions array #526

@BooleT37

Description

@BooleT37

When using reflux.createActions with following syntax:
var Actions = Reflux.createActions([{ actionName: "action1", sync: false }, { actionName: "action2", sync: false }, { actionName: "action3", asyncResult: true }]);
it works incorrectly.

Given my example, I expect to get an object
{ action1, action2, action3 }.

But instead I get an object
{ actionName, asyncResult, sync }

Screenshot:
screenshot

Seems like it considers every array item to be an object with action names as properties instead of action definitions therefore we get this wrong behavior.

I am using reflux 6.4.1

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