summaryrefslogtreecommitdiffstats
path: root/webapp/dispatcher
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-03-28 14:49:48 -0400
committerHarrison Healey <harrisonmhealey@gmail.com>2016-03-28 14:49:48 -0400
commit4d302a0ed02d13eeccc0f868536116bfc8000a69 (patch)
treec85af5b7d43b5b38ac824a5f76eb08cfb9c2d2ab /webapp/dispatcher
parentdbd503138f1e13935c539225e768f346d79a89f2 (diff)
downloadchat-4d302a0ed02d13eeccc0f868536116bfc8000a69.tar.gz
chat-4d302a0ed02d13eeccc0f868536116bfc8000a69.tar.bz2
chat-4d302a0ed02d13eeccc0f868536116bfc8000a69.zip
Added a warning message when AppDispatcher tries to dispatch without an action type
Diffstat (limited to 'webapp/dispatcher')
-rw-r--r--webapp/dispatcher/app_dispatcher.jsx8
1 files changed, 8 insertions, 0 deletions
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