jcperez-ch / flaxs

const Flaxs = Flux + Redux.principles();
BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

Stack trace is swallowed when payload or payload.actionType is not defined #27

Open charlespwd opened 8 years ago

charlespwd commented 8 years ago

Stack trace is swallowed when payload or payload.actionType is not defined.

https://github.com/jcperez-ch/flaxs/blob/master/src/Action.js#L6 https://github.com/jcperez-ch/flaxs/blob/master/src/Action.js#L58

jcperez-ch commented 8 years ago

Yeah @charlespwd this is part of the inheritance from mcFly, due to the async nature of the actions they had to do it that way. Have you tried the synchronous flag when you define the action?

x = flaxs.createActions({ /* your actions here */}, true);

second parameter indicates if the action is sync or async, that is something that flaxs introduced, unfortunately it doesn't work for async calls to server since we are prone to dispatch several payloads at the same time and the flux dispatcher complains...

In any case this should be fixed in future releases, thank U