File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ interface WebContainerContext {
77 loaded : boolean ;
88}
99
10- export const webcontainerContext : WebContainerContext = import . meta. hot ?. data . webcontainerContext ?? {
11- loaded : false ,
10+ export const webcontainerContext : WebContainerContext = import . meta. hot ?. data ? .webcontainerContext ?? {
11+ loaded : true ,
1212} ;
1313
14- if ( import . meta. hot ) {
14+ if ( import . meta. hot && import . meta . hot . data ) {
1515 import . meta. hot . data . webcontainerContext = webcontainerContext ;
1616}
1717
@@ -27,7 +27,7 @@ export function onWebContainerPreviewError(callback: (alert: ActionAlert) => voi
2727
2828if ( ! import . meta. env . SSR ) {
2929 webcontainer =
30- import . meta. hot ?. data . webcontainer ??
30+ import . meta. hot ?. data ? .webcontainer ??
3131 Promise . resolve ( )
3232 . then ( ( ) => {
3333 return WebContainer . boot ( {
@@ -63,7 +63,7 @@ if (!import.meta.env.SSR) {
6363 return wc ;
6464 } ) ;
6565
66- if ( import . meta. hot ) {
66+ if ( import . meta. hot && import . meta . hot . data ) {
6767 import . meta. hot . data . webcontainer = webcontainer ;
6868 }
6969}
You can’t perform that action at this time.
0 commit comments