File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ Reducers can optionally provide a `changeDetector` function to override what cha
31
31
32
32
Flags on actions can affect the behavior of the undo history state:
33
33
- ` 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
35
35
state in another system (eg. a backend service) cannot be reversed.
36
36
37
37
## Example Usage
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export default function Undoable(reducers) {
86
86
87
87
// New states can only be pushed into the history if anything we care about actually changed.
88
88
if ( anyChanged ) {
89
- if ( action . undoableIrreversableCheckpoint ) {
89
+ if ( action . undoableIrreversibleCheckpoint ) {
90
90
return {
91
91
past : [ nextState ] , // irreversible checkpoints should clear out history
92
92
present : nextState ,
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ describe('Undoable', () => {
102
102
} ) ;
103
103
} ) ;
104
104
105
- context ( 'when undoableIrreversableCheckpoint is true' , ( ) => {
105
+ context ( 'when undoableIrreversibleCheckpoint is true' , ( ) => {
106
106
let nextState ;
107
107
108
108
beforeEach ( ( ) => {
@@ -111,7 +111,7 @@ describe('Undoable', () => {
111
111
present : { test : 1 } ,
112
112
future : [ { something : true } ]
113
113
} , { } ) ;
114
- nextState = UndoableReducer ( initialState , { type : TEST_ACTION , undoableIrreversableCheckpoint : true } )
114
+ nextState = UndoableReducer ( initialState , { type : TEST_ACTION , undoableIrreversibleCheckpoint : true } )
115
115
} ) ;
116
116
117
117
it ( 'sets the present' , ( ) => expect ( nextState . present ) . to . deep . equal ( { test : 2 } ) ) ;
You can’t perform that action at this time.
0 commit comments