Skip to content

Commit 07a06e3

Browse files
author
Josh Dover
committed
Fix spelling of undoableIrreversibleCheckpoint
1 parent 9244e92 commit 07a06e3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Reducers can optionally provide a `changeDetector` function to override what cha
3131

3232
Flags on actions can affect the behavior of the undo history state:
3333
- `undoableHistoryCheckpoint`: Marks when the next state should be considered a checkpoint in the undo history
34-
- `undoableIrreversableCheckpoint`: Marks when the next state should clear any undo history. Typically used if related
34+
- `undoableIrreversibleCheckpoint`: Marks when the next state should clear any undo history. Typically used if related
3535
state in another system (eg. a backend service) cannot be reversed.
3636

3737
## Example Usage

Diff for: src/Undoable.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export default function Undoable(reducers) {
8686

8787
// New states can only be pushed into the history if anything we care about actually changed.
8888
if (anyChanged) {
89-
if (action.undoableIrreversableCheckpoint) {
89+
if (action.undoableIrreversibleCheckpoint) {
9090
return {
9191
past: [nextState], // irreversible checkpoints should clear out history
9292
present: nextState,

Diff for: test/Undoable.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ describe('Undoable', () => {
102102
});
103103
});
104104

105-
context('when undoableIrreversableCheckpoint is true', () => {
105+
context('when undoableIrreversibleCheckpoint is true', () => {
106106
let nextState;
107107

108108
beforeEach(() => {
@@ -111,7 +111,7 @@ describe('Undoable', () => {
111111
present: { test: 1 },
112112
future: [{ something: true }]
113113
}, {});
114-
nextState = UndoableReducer(initialState, { type: TEST_ACTION, undoableIrreversableCheckpoint: true })
114+
nextState = UndoableReducer(initialState, { type: TEST_ACTION, undoableIrreversibleCheckpoint: true })
115115
});
116116

117117
it('sets the present', () => expect(nextState.present).to.deep.equal({ test: 2 }));

0 commit comments

Comments
 (0)