diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-03-29 07:53:30 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-03-29 07:53:30 -0400 |
commit | bf636404d25e943d869a32d8fe145eaa57a64039 (patch) | |
tree | 4d98ee729e2e52551d6db070b06f95b4750145dd | |
parent | 86788887103abbe36ff61ab5766adc1a5d51f1ee (diff) | |
parent | 4d302a0ed02d13eeccc0f868536116bfc8000a69 (diff) | |
download | chat-bf636404d25e943d869a32d8fe145eaa57a64039.tar.gz chat-bf636404d25e943d869a32d8fe145eaa57a64039.tar.bz2 chat-bf636404d25e943d869a32d8fe145eaa57a64039.zip |
Merge pull request #2553 from hmhealey/actions
Added a warning message when AppDispatcher tries to dispatch without an action type
-rw-r--r-- | webapp/dispatcher/app_dispatcher.jsx | 8 |
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 |