File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,11 @@ export class RNodeRuntime extends RNode {
27
27
28
28
/** @type {LoadSvelteModule } */
29
29
this . asyncModule = asyncModule
30
+
31
+ if ( ! this . module ) {
32
+ this . module = NoopModule
33
+ this . meta . isNoop = true
34
+ }
30
35
}
31
36
32
37
// TODO DEPRECATE
@@ -62,6 +67,7 @@ export class RNodeRuntime extends RNode {
62
67
return ! ! ( this . module || this . asyncModule )
63
68
}
64
69
70
+ // todo deprecate - not used
65
71
/** @ts -ignore SvelteComponentConstructor is only available in VSCode */
66
72
/** @returns {Promise<SvelteComponentDev> } */
67
73
async getRawComponent ( ) {
@@ -85,9 +91,7 @@ export class RNodeRuntime extends RNode {
85
91
* @returns {Promise<ReservedCmpProps|undefined> | ReservedCmpProps | undefined }
86
92
*/
87
93
loadModule ( ) {
88
- if ( ! this . module && ! this . asyncModule ) this . module = NoopModule
89
- if ( ! this . module && this . asyncModule ) return this . asyncLoadModule ( )
90
- return /** @type {ReservedCmpProps } */ ( this . module )
94
+ return /** @type {ReservedCmpProps } */ ( this . module || this . asyncLoadModule ( ) )
91
95
}
92
96
93
97
/**
You can’t perform that action at this time.
0 commit comments