remote-redux-devtools
Advanced tools
Comparing version 0.1.8 to 0.1.9
@@ -27,5 +27,5 @@ 'use strict'; | ||
var store = {}; | ||
var shouldInit = true; | ||
var lastAction = void 0; | ||
var filters = void 0; | ||
var isExcess = void 0; | ||
@@ -37,18 +37,14 @@ function isFiltered(action) { | ||
function relay(type, state, action, nextActionId, isExcess) { | ||
function relay(type, state, action, nextActionId) { | ||
if (filters && isFiltered(action)) return; | ||
setTimeout(function () { | ||
var message = { | ||
payload: state ? (0, _jsan.stringify)(state) : '', | ||
action: action ? (0, _jsan.stringify)(action) : '', | ||
nextActionId: nextActionId || '', | ||
type: type, | ||
id: socket.id, | ||
name: instanceName, | ||
isExcess: isExcess, | ||
init: shouldInit | ||
}; | ||
if (shouldInit) shouldInit = false; | ||
socket.emit(socket.id ? 'log' : 'log-noid', message); | ||
}, 0); | ||
var message = { | ||
payload: state ? (0, _jsan.stringify)(state) : '', | ||
action: action ? (0, _jsan.stringify)(action) : '', | ||
nextActionId: nextActionId || '', | ||
type: type, | ||
id: socket.id, | ||
name: instanceName, | ||
isExcess: isExcess | ||
}; | ||
socket.emit(socket.id ? 'log' : 'log-noid', message); | ||
} | ||
@@ -134,4 +130,4 @@ | ||
if (lastAction === 'JUMP_TO_STATE') return; | ||
var isExcess = maxAge && liftedState.stagedActionIds.length === maxAge; | ||
relay('ACTION', state, liftedAction, nextActionId, isExcess); | ||
relay('ACTION', state, liftedAction, nextActionId); | ||
if (!isExcess && maxAge) isExcess = liftedState.stagedActionIds.length >= maxAge; | ||
} else { | ||
@@ -138,0 +134,0 @@ relay('STATE', filterStagedActions(liftedState)); |
{ | ||
"name": "remote-redux-devtools", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "Relay Redux actions to remote Redux DevTools.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
11935
140