From 9f22c9cca5872c89153fd17c4f64de061ea265dc Mon Sep 17 00:00:00 2001 From: Linus Miller Date: Sun, 1 Dec 2019 17:16:05 +0100 Subject: [PATCH] Differentiate between unnamed actions and direct setState calls in devtools --- devtools.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools.js b/devtools.js index 325886e..79a6a7c 100644 --- a/devtools.js +++ b/devtools.js @@ -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);