Skip to content

Commit

Permalink
Added a warning message when AppDispatcher tries to dispatch without …
Browse files Browse the repository at this point in the history
…an action type
  • Loading branch information
hmhealey committed Mar 28, 2016
1 parent 59b4dd2 commit 5037d80
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dispatcher/app_dispatcher.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5037d80

Please sign in to comment.