From 4d302a0ed02d13eeccc0f868536116bfc8000a69 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Mon, 28 Mar 2016 14:49:48 -0400 Subject: Added a warning message when AppDispatcher tries to dispatch without an action type --- webapp/dispatcher/app_dispatcher.jsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/webapp/dispatcher/app_dispatcher.jsx b/webapp/dispatcher/app_dispatcher.jsx index dcc43129b..987bb9c6a 100644 --- a/webapp/dispatcher/app_dispatcher.jsx +++ b/webapp/dispatcher/app_dispatcher.jsx @@ -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 -- cgit v1.2.3-1-g7c22