File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,13 +32,13 @@ export class Store {
3232 const fcn = parseFcnString ( nodeStr )
3333 return fcn
3434 } )
35- this . addConstructor ( "Response" , ( nodeStr : string ) => {
35+ this . addConstructor ( "Response" , async ( nodeStr : string ) => {
3636 const data = JSON . parse ( nodeStr )
3737
3838 const headers = new Headers ( )
3939 data . headers . forEach ( ( entry : string [ ] ) => headers . set ( entry [ 0 ] , entry [ 1 ] ) )
4040
41- return new Response ( data . body , {
41+ return new Response ( ( await fetch ( data . body ) ) . body , {
4242 status : data . status ,
4343 statusText : data . statusText ,
4444 headers
@@ -81,7 +81,7 @@ export class Store {
8181 const nodeString = await this . shelf . get ( nodeId )
8282 if ( ! nodeString ) throw new Error ( `No node string found for item with id ${ nodeId } ` )
8383
84- const nodeObj = constructor ( nodeString )
84+ const nodeObj = await constructor ( nodeString )
8585 this . #basket. set ( nodeId , nodeObj )
8686
8787 for ( const key in nodeObj ) {
Original file line number Diff line number Diff line change @@ -12,9 +12,9 @@ export async function serialize (node: unknown): Promise<string> {
1212 const bodyBlob = await node . blob ( )
1313 reader . readAsDataURL ( bodyBlob )
1414
15- const bodyDataURL = await new Promise ( res => {
15+ const bodyDataURL : string = await new Promise ( res => {
1616 reader . addEventListener ( "load" , ( ) => {
17- res ( reader . result ) ;
17+ res ( reader . result as string ) ;
1818 } ) ;
1919 } )
2020
You can’t perform that action at this time.
0 commit comments