Merge pull request #2553 from hmhealey/actions

Added a warning message when AppDispatcher tries to dispatch without an action type
Этот коммит содержится в:
Joram Wilander
2016-03-29 07:53:30 -04:00
родитель 8678888710 4d302a0ed0
Коммит bf636404d2

Просмотреть файл

@@ -8,6 +8,10 @@ const PayloadSources = Constants.PayloadSources;
const AppDispatcher = Object.assign(new Flux.Dispatcher(), {
handleServerAction: function performServerAction(action) {
if (!action.type) {
console.log('handleServerAction called with undefined action type'); // eslint-disable-line no-console
}
var payload = {
source: PayloadSources.SERVER_ACTION,
action
@@ -16,6 +20,10 @@ const AppDispatcher = Object.assign(new Flux.Dispatcher(), {
},
handleViewAction: function performViewAction(action) {
if (!action.type) {
console.log('handleServerAction called with undefined action type'); // eslint-disable-line no-console
}
var payload = {
source: PayloadSources.VIEW_ACTION,
action