File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
packages/react-native/src Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -148,10 +148,12 @@ export class View {
148
148
} ;
149
149
150
150
createPreparedStoryMapping = async ( ) => {
151
- await Promise . all (
152
- Object . keys ( this . _storyIndex . entries ) . map ( async ( storyId : StoryId ) => {
153
- this . _idToPrepared [ storyId ] = await this . _preview . loadStory ( { storyId } ) ;
154
- } )
151
+ await this . _preview . storeInitializationPromise . then ( ( ) =>
152
+ Promise . all (
153
+ Object . keys ( this . _storyIndex . entries ) . map ( async ( storyId : StoryId ) => {
154
+ this . _idToPrepared [ storyId ] = await this . _preview . loadStory ( { storyId } ) ;
155
+ } )
156
+ )
155
157
) ;
156
158
} ;
157
159
@@ -178,7 +180,9 @@ export class View {
178
180
this . _preview . channel = channel ;
179
181
this . _preview . setupListeners ( ) ;
180
182
channel . emit ( Events . CHANNEL_CREATED ) ;
181
- this . _preview . initializeWithStoryIndex ( this . _storyIndex ) ;
183
+ this . _preview . storeInitializationPromise . then ( ( ) =>
184
+ this . _preview . initializeWithStoryIndex ( this . _storyIndex )
185
+ ) ;
182
186
}
183
187
184
188
managerAddons . loadAddons ( {
You can’t perform that action at this time.
0 commit comments