File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export interface DittoProviderProps {
20
20
*
21
21
* Returns a single Ditto instance or an array of instances.
22
22
*/
23
- setup : ( ) => Ditto | Ditto [ ]
23
+ setup : ( ) => Ditto | Ditto [ ] | Promise < Ditto | Ditto [ ] >
24
24
render ?: RenderFunction
25
25
children ?: RenderFunction
26
26
}
@@ -65,7 +65,7 @@ export const DittoProvider: React.FunctionComponent<DittoProviderProps> = (
65
65
hasMountEffectStarted . current = true
66
66
try {
67
67
await init ( props . initOptions )
68
- const setupReturnValue : Ditto | Ditto [ ] = props . setup ( )
68
+ const setupReturnValue : Ditto | Ditto [ ] = await props . setup ( )
69
69
if ( Array . isArray ( setupReturnValue ) ) {
70
70
const dittoHash : DittoHash = { }
71
71
const dittos : Ditto [ ] = setupReturnValue
You can’t perform that action at this time.
0 commit comments