File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,6 @@ export class Board {
77
77
return result ?? id ;
78
78
} ;
79
79
80
- private initialModulePromise : Promise < ModuleWrapper > | undefined ;
81
80
/**
82
81
* Defined during start().
83
82
*/
@@ -92,9 +91,6 @@ export class Board {
92
91
private fs : FileSystem ,
93
92
private svg : SVGElement
94
93
) {
95
- // We start this loading here so as not to delay loading WASM until start().
96
- this . initialModulePromise = this . createModule ( ) ;
97
-
98
94
this . display = new Display (
99
95
Array . from ( this . svg . querySelector ( "#LEDsOn" ) ! . querySelectorAll ( "use" ) )
100
96
) ;
@@ -320,14 +316,8 @@ export class Board {
320
316
if ( this . modulePromise ) {
321
317
throw new Error ( "Module already exists!" ) ;
322
318
}
323
- // Use the pre-loaded one the first time through.
324
- if ( this . initialModulePromise ) {
325
- this . modulePromise = this . initialModulePromise ;
326
- this . initialModulePromise = undefined ;
327
- } else {
328
- this . modulePromise = this . createModule ( ) ;
329
- }
330
319
320
+ this . modulePromise = this . createModule ( ) ;
331
321
const module = await this . modulePromise ;
332
322
let panicCode : number | undefined ;
333
323
try {
You can’t perform that action at this time.
0 commit comments