File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -186,14 +186,13 @@ function getInstantiateWasmFunc(
186186 return ;
187187 }
188188 const { binary, response } = getBinaryResponse ( indexURL + "pyodide.asm.wasm" ) ;
189- return function (
189+ return async function (
190190 imports : { [ key : string ] : any } ,
191191 successCallback : (
192192 instance : WebAssembly . Instance ,
193193 module : WebAssembly . Module ,
194194 ) => void ,
195195 ) {
196- ( async function ( ) {
197196 try {
198197 let res : WebAssembly . WebAssemblyInstantiatedSource ;
199198 if ( response ) {
@@ -203,12 +202,10 @@ function getInstantiateWasmFunc(
203202 }
204203 const { instance, module } = res ;
205204 successCallback ( instance , module ) ;
205+ return instance . exports ;
206206 } catch ( e ) {
207207 console . warn ( "wasm instantiation failed!" ) ;
208208 console . warn ( e ) ;
209209 }
210- } ) ( ) ;
211-
212- return { } ; // Compiling asynchronously, no exports.
213210 } ;
214211}
You can’t perform that action at this time.
0 commit comments