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 = {
88 loading : boolean ,
99 loaded : boolean ,
1010 error : ?Error ,
11+ promise : ?Promise < any > ,
1112}
1213
1314export type Props = {
Original file line number Diff line number Diff line change @@ -39,11 +39,17 @@ export default (props: Props): Promise<any> =>
3939 }
4040 ) )
4141
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+ } {
4348 const result = results [ src ]
4449 return {
4550 loading : result == null ,
4651 loaded : result ? ! result . error : false ,
4752 error : result && result . error ,
53+ promise : promises [ src ] ,
4854 }
4955}
You can’t perform that action at this time.
0 commit comments