Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getLiftedState() {
return filterStagedActions(this.getLiftedStateRaw(), this.filters);
}
const liftedAction = liftedState.actionsById[nextActionId - 1];
if (isFiltered(liftedAction.action, this.filters)) return;
this.relay('ACTION', state, liftedAction, nextActionId);
if (!this.isExcess && maxAge) this.isExcess = liftedState.stagedActionIds.length >= maxAge;
} else {
if (this.lastAction === 'JUMP_TO_STATE') return;
if (this.lastAction === 'PAUSE_RECORDING') {
this.paused = liftedState.isPaused;
} else if (this.lastAction === 'LOCK_CHANGES') {
this.locked = liftedState.isLocked;
}
if (this.paused || this.locked) {
if (this.lastAction) this.lastAction = undefined;
else return;
}
this.relay('STATE', filterStagedActions(liftedState, this.filters));
}
}
function getLiftedState(store, filters) {
return filterStagedActions(store.liftedStore.getState(), filters);
}
function checkForReducerErrors(liftedState, instance) {
if (liftedState.computedStates[liftedState.currentStateIndex].error) {
relay('STATE', filterStagedActions(liftedState, instance.filters), instance);
return true;
}
return false;
}
if (isFiltered(liftedAction.action, filters)) return;
if (predicate && !predicate(state, liftedAction.action)) return;
relay('ACTION', state, instance, liftedAction, nextActionId);
if (!isExcess && maxAge) isExcess = liftedState.stagedActionIds.length >= maxAge;
} else {
if (lastAction === 'JUMP_TO_STATE') return;
if (lastAction === 'PAUSE_RECORDING') {
paused = liftedState.isPaused;
} else if (lastAction === 'LOCK_CHANGES') {
locked = liftedState.isLocked;
}
if (paused || locked) {
if (lastAction) lastAction = undefined;
else return;
}
relay('STATE', filterStagedActions(liftedState, filters), instance);
}
}