redux-devtools-instrument
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -351,18 +351,36 @@ 'use strict'; | ||
{ | ||
var _liftedAction$nextLif = liftedAction.nextLiftedState; | ||
// Completely replace everything. | ||
if (Array.isArray(liftedAction.nextLiftedState)) { | ||
// recompute array of actions | ||
actionsById = { 0: liftAction(INIT_ACTION) }; | ||
nextActionId = 1; | ||
stagedActionIds = [0]; | ||
skippedActionIds = []; | ||
currentStateIndex = liftedAction.nextLiftedState.length; | ||
computedStates = []; | ||
minInvalidatedStateIndex = 0; | ||
// iterate through actions | ||
liftedAction.nextLiftedState.forEach(function (action) { | ||
actionsById[nextActionId] = liftAction(action); | ||
stagedActionIds.push(nextActionId); | ||
nextActionId++; | ||
}); | ||
} else { | ||
var _liftedAction$nextLif = liftedAction.nextLiftedState; | ||
// Completely replace everything. | ||
monitorState = _liftedAction$nextLif.monitorState; | ||
actionsById = _liftedAction$nextLif.actionsById; | ||
nextActionId = _liftedAction$nextLif.nextActionId; | ||
stagedActionIds = _liftedAction$nextLif.stagedActionIds; | ||
skippedActionIds = _liftedAction$nextLif.skippedActionIds; | ||
committedState = _liftedAction$nextLif.committedState; | ||
currentStateIndex = _liftedAction$nextLif.currentStateIndex; | ||
computedStates = _liftedAction$nextLif.computedStates; | ||
monitorState = _liftedAction$nextLif.monitorState; | ||
actionsById = _liftedAction$nextLif.actionsById; | ||
nextActionId = _liftedAction$nextLif.nextActionId; | ||
stagedActionIds = _liftedAction$nextLif.stagedActionIds; | ||
skippedActionIds = _liftedAction$nextLif.skippedActionIds; | ||
committedState = _liftedAction$nextLif.committedState; | ||
currentStateIndex = _liftedAction$nextLif.currentStateIndex; | ||
computedStates = _liftedAction$nextLif.computedStates; | ||
if (liftedAction.noRecompute) { | ||
minInvalidatedStateIndex = Infinity; | ||
if (liftedAction.noRecompute) { | ||
minInvalidatedStateIndex = Infinity; | ||
} | ||
} | ||
break; | ||
@@ -369,0 +387,0 @@ } |
{ | ||
"name": "redux-devtools-instrument", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Redux DevTools instrumentation", | ||
@@ -5,0 +5,0 @@ "main": "lib/instrument.js", |
@@ -325,17 +325,35 @@ import difference from 'lodash/difference'; | ||
case ActionTypes.IMPORT_STATE: { | ||
// Completely replace everything. | ||
({ | ||
monitorState, | ||
actionsById, | ||
nextActionId, | ||
stagedActionIds, | ||
skippedActionIds, | ||
committedState, | ||
currentStateIndex, | ||
computedStates | ||
} = liftedAction.nextLiftedState); | ||
if (Array.isArray(liftedAction.nextLiftedState)) { | ||
// recompute array of actions | ||
actionsById = { 0: liftAction(INIT_ACTION) }; | ||
nextActionId = 1; | ||
stagedActionIds = [0]; | ||
skippedActionIds = []; | ||
currentStateIndex = liftedAction.nextLiftedState.length; | ||
computedStates = []; | ||
minInvalidatedStateIndex = 0; | ||
// iterate through actions | ||
liftedAction.nextLiftedState.forEach(action => { | ||
actionsById[nextActionId] = liftAction(action); | ||
stagedActionIds.push(nextActionId); | ||
nextActionId++; | ||
}); | ||
} else { | ||
// Completely replace everything. | ||
({ | ||
monitorState, | ||
actionsById, | ||
nextActionId, | ||
stagedActionIds, | ||
skippedActionIds, | ||
committedState, | ||
currentStateIndex, | ||
computedStates | ||
} = liftedAction.nextLiftedState); | ||
if (liftedAction.noRecompute) { | ||
minInvalidatedStateIndex = Infinity; | ||
if (liftedAction.noRecompute) { | ||
minInvalidatedStateIndex = Infinity; | ||
} | ||
} | ||
break; | ||
@@ -342,0 +360,0 @@ } |
38705
919