()
| 218 | } |
| 219 | |
| 220 | function commitChanges() { |
| 221 | // Consider the last committed state the new starting point. |
| 222 | // Squash any staged actions into a single committed state. |
| 223 | actionsById = { 0: liftAction(INIT_ACTION) }; |
| 224 | nextActionId = 1; |
| 225 | stagedActionIds = [0]; |
| 226 | skippedActionIds = []; |
| 227 | committedState = computedStates[currentStateIndex].state; |
| 228 | currentStateIndex = 0; |
| 229 | computedStates = []; |
| 230 | } |
| 231 | |
| 232 | // By default, aggressively recompute every state whatever happens. |
| 233 | // This has O(n) performance, so we'll override this to a sensible |
no test coverage detected