(state, liftedState, maxAge, instance)
| 226 | } |
| 227 | |
| 228 | function handleChange(state, liftedState, maxAge, instance) { |
| 229 | if (checkForReducerErrors(liftedState, instance)) return |
| 230 | |
| 231 | const { filters, predicate } = instance |
| 232 | if (lastAction === 'PERFORM_ACTION') { |
| 233 | const { nextActionId } = liftedState |
| 234 | const liftedAction = liftedState.actionsById[nextActionId - 1] |
| 235 | if (isFiltered(liftedAction.action, filters)) return |
| 236 | if (predicate && !predicate(state, liftedAction.action)) return |
| 237 | relay('ACTION', state, instance, liftedAction, nextActionId) |
| 238 | if (!isExcess && maxAge) isExcess = liftedState.stagedActionIds.length >= maxAge |
| 239 | } else { |
| 240 | if (lastAction === 'JUMP_TO_STATE') return |
| 241 | if (lastAction === 'PAUSE_RECORDING') { |
| 242 | paused = liftedState.isPaused |
| 243 | } else if (lastAction === 'LOCK_CHANGES') { |
| 244 | locked = liftedState.isLocked |
| 245 | } |
| 246 | if (paused || locked) { |
| 247 | if (lastAction) lastAction = undefined |
| 248 | else return |
| 249 | } |
| 250 | relay('STATE', filterStagedActions(liftedState, filters), instance) |
| 251 | } |
| 252 | } |
| 253 | |
| 254 | export default function devToolsEnhancer(options = {}) { |
| 255 | const { |
no test coverage detected