File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,12 @@ import { hunspellLoader } from './hunspellLoader';
3
3
import { isWasmEnabled } from './util/isWasmEnabled' ;
4
4
5
5
export const loadModule = async ( ) : Promise < spellCheckerFactory > => {
6
+ const modulePath = `./lib/${ isWasmEnabled ( ) ? 'wasm' : 'asm' } /hunspell` ;
6
7
//tslint:disable-next-line:no-require-imports
7
- const moduleLoader = isWasmEnabled ( ) ? require ( './lib/wasm/hunspell' ) : null ;
8
+ const moduleLoader = require ( modulePath ) ;
8
9
const asmModule = moduleLoader ( ) ;
9
10
10
- //TODO: need to move into preprocessor
11
- const initialize = new Promise ( ( resolve ) => asmModule . onRuntimeInitialized = ( ) => resolve ( ) ) ;
12
- await initialize ;
11
+ await asmModule . initializeRuntime ( ) ;
13
12
14
13
return hunspellLoader ( asmModule ) ;
15
14
} ;
You can’t perform that action at this time.
0 commit comments