File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ function workerSetup() {
1111 p = Promise . reject ( 'No such method' ) ;
1212 }
1313 p . then ( result => {
14- postMessage ( { type : 'RPC' , id, result } ) ;
15- } )
14+ postMessage ( { type : 'RPC' , id, result } ) ;
15+ } )
1616 . catch ( e => {
17- let error = { message : e } ;
17+ let error = { message : e } ;
1818 if ( e . stack ) {
1919 error . message = e . message ;
2020 error . stack = e . stack ;
@@ -29,6 +29,7 @@ function workerSetup() {
2929
3030const workerScript = '\n' + Function . prototype . toString . call ( workerSetup ) . replace ( / ( ^ .* \{ | \} .* $ | \n \s * ) / g, '' ) ;
3131
32- export default function rpcWorkerLoader ( content ) {
33- return content + workerScript ;
32+ export default function rpcWorkerLoader ( content , sourceMap ) {
33+ const callback = this . async ( ) ;
34+ callback ( null , content + workerScript , sourceMap ) ;
3435}
You can’t perform that action at this time.
0 commit comments