Skip to content

Commit

Permalink
Differentiate between unnamed actions and direct setState calls in de…
Browse files Browse the repository at this point in the history
…vtools
  • Loading branch information
lkmill committed Dec 1, 2019
1 parent c90747d commit 9f22c9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion devtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = function unistoreDevTools(store) {
});
store.devtools.init(store.getState());
store.subscribe(function (state, action, update) {
var actionName = action && (action.name || action.type) || 'setState';
var actionName = action ? action.name || action.type || 'Unnamed' : 'setState';

if (!ignoreState) {
store.devtools.send({ type: actionName, update: update }, state);
Expand Down

0 comments on commit 9f22c9c

Please sign in to comment.