File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ export type State = {
8
8
loading : boolean ,
9
9
loaded : boolean ,
10
10
error : ?Error ,
11
+ promise : ?Promise < any > ,
11
12
}
12
13
13
14
export type Props = {
Original file line number Diff line number Diff line change @@ -39,11 +39,17 @@ export default (props: Props): Promise<any> =>
39
39
}
40
40
) )
41
41
42
- export function getState ( { src} : Props ) : { loading : boolean , loaded : boolean , error : ?Error } {
42
+ export function getState ( { src} : Props ) : {
43
+ loading : boolean ,
44
+ loaded : boolean ,
45
+ error : ?Error ,
46
+ promise : ?Promise < any > ,
47
+ } {
43
48
const result = results [ src ]
44
49
return {
45
50
loading : result == null ,
46
51
loaded : result ? ! result . error : false ,
47
52
error : result && result . error ,
53
+ promise : promises [ src ] ,
48
54
}
49
55
}
You can’t perform that action at this time.
0 commit comments