File tree Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -30,11 +30,13 @@ const deferred = () => ({
30
30
} ,
31
31
resolve ( value ) {
32
32
this . value = value ;
33
+ this . status = DEFERRED_RESOLVED ;
33
34
if ( this . onDone ) this . onDone ( value ) ;
34
35
return this ;
35
36
} ,
36
37
reject ( value ) {
37
38
this . value = value ;
39
+ this . status = DEFERRED_REJECTED ;
38
40
if ( this . onFail ) this . onFail ( value ) ;
39
41
return this ;
40
42
}
Original file line number Diff line number Diff line change @@ -38,12 +38,14 @@ class Deferred {
38
38
39
39
resolve ( value ) {
40
40
this . value = value ;
41
+ this . status = DEFERRED_RESOLVED ;
41
42
if ( this . onDone ) this . onDone ( value ) ;
42
43
return this ;
43
44
}
44
45
45
46
reject ( value ) {
46
47
this . value = value ;
48
+ this . status = DEFERRED_REJECTED ;
47
49
if ( this . onFail ) this . onFail ( value ) ;
48
50
return this ;
49
51
}
Original file line number Diff line number Diff line change @@ -41,12 +41,14 @@ class Deferred extends EventEmitter {
41
41
42
42
resolve ( value ) {
43
43
this . value = value ;
44
+ this . status = DEFERRED_RESOLVED ;
44
45
this . emit ( 'done' , value ) ;
45
46
return this ;
46
47
}
47
48
48
49
reject ( value ) {
49
50
this . value = value ;
51
+ this . status = DEFERRED_REJECTED ;
50
52
this . emit ( 'fail' , value ) ;
51
53
return this ;
52
54
}
You can’t perform that action at this time.
0 commit comments