File tree Expand file tree Collapse file tree 1 file changed +10
-23
lines changed Expand file tree Collapse file tree 1 file changed +10
-23
lines changed Original file line number Diff line number Diff line change @@ -23,35 +23,22 @@ class StateTravel {
23
23
this . internals = internals ;
24
24
this . driver = driver ;
25
25
this . _counter = 0 ;
26
- }
27
-
28
- async step ( ) {
29
- return State . step ( this . driver , ++ this . _counter , this . internals ) ;
30
- }
26
+ this . _default = async function _default ( ) {
27
+ await State . step ( this . driver , ++ this . _counter , this . internals ) ;
31
28
32
- async update ( ) {
33
- return State . update (
34
- this . driver ,
35
- this . file ,
36
- this . internals . modSchema ,
37
- this . internals
38
- ) ;
39
- }
40
-
41
- async default ( ) {
42
- await this . step ( ) ;
43
- const res = await this . update ( ) ;
44
-
45
- return res ;
29
+ return State . update (
30
+ this . driver ,
31
+ this . file ,
32
+ this . internals . modSchema ,
33
+ this . internals
34
+ ) ;
35
+ } ;
46
36
}
47
37
}
48
38
49
39
Object . keys ( DEFAULT ) . forEach ( m => {
50
40
StateTravel . prototype [ m ] = async function ( ...args ) {
51
- await this . step ( ) ;
52
- const res = await this . update ( ) ;
53
-
54
- return res ;
41
+ return this . _default ( ) ;
55
42
} ;
56
43
} ) ;
57
44
You can’t perform that action at this time.
0 commit comments