File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -10,16 +10,16 @@ export default async function loadReactClientManifest(reactClientManifestFileNam
1010 // Thus, the __dirname of this code is where we can find the manifest file.
1111 const manifestPath = path . resolve ( __dirname , reactClientManifestFileName ) ;
1212 const loadedReactClientManifest = loadedReactClientManifests . get ( manifestPath ) ;
13- if ( ! loadedReactClientManifest ) {
14- // TODO: convert to async
15- try {
16- const manifest = JSON . parse ( await fs . readFile ( manifestPath , 'utf8' ) ) as ClientManifest ;
17- loadedReactClientManifests . set ( manifestPath , manifest ) ;
18- return manifest ;
19- } catch ( error ) {
20- throw new Error ( `Failed to load React client manifest from ${ manifestPath } : ${ error } ` ) ;
21- }
13+ if ( loadedReactClientManifest ) {
14+ return loadedReactClientManifest ;
2215 }
2316
24- return loadedReactClientManifest ;
17+ // TODO: convert to async
18+ try {
19+ const manifest = JSON . parse ( await fs . readFile ( manifestPath , 'utf8' ) ) as ClientManifest ;
20+ loadedReactClientManifests . set ( manifestPath , manifest ) ;
21+ return manifest ;
22+ } catch ( error ) {
23+ throw new Error ( `Failed to load React client manifest from ${ manifestPath } : ${ error } ` ) ;
24+ }
2525}
You can’t perform that action at this time.
0 commit comments